Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #790] remove version checking from the core #376

Closed
icinga-migration opened this issue Sep 15, 2010 · 4 comments
Closed

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/790

Created by mfriedrich on 2010-09-15 08:25:08 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2010-09-20 07:56:10 +00:00)
Target Version: 1.2 (Stable)
Last Update: 2010-09-20 07:56:09 +00:00 (in Redmine)


currently, the core "features" an update checker originating from nagios core which is within the core source/binary and remains completely useless (we don't have that and memory leaks are reported).

Changesets

2010-09-17 11:56:44 +00:00 by mfriedrich ea96f31

core: remove program update checks as scheduled timed events, not written to status/retention.dat anymore

remains useless as core scheduled timed event because Icinga does
not provide a webserver where to check for updates.

furthermore, such a feature can be easily implemented through a dynamic web,
checking local and remote versions periodically.

also removed utils.inc.php parsing status/retention.dat - Icinga does not use that.
no one will ever know why this was not implemented into the cgis, because they already
parse main config, and the .dat's - one step further to remove php dependency.

refs #790

2010-09-17 12:10:27 +00:00 by mfriedrich 263d02a

fix forgotten html/Makefile.in not installing includes/ anymore

refs #790

2010-09-20 08:50:43 +00:00 by mfriedrich a43fb6a

remove php dependency and files for updatechecks/extended search in icinga.spec

refs #800
refs #790
@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-09-17 09:19:30 +00:00

  • remove configs, show warning
  • remove profiler timedevent for CHECK_PROGRAM_UPDATE
  • remove event handling CHECK_PROGRAM_UPDATE
  • remove anything regarding update check and calculation from icinga.c utils.c
  • remove defines from icinga.h
  • remove writing to retentation.dat and status.dat
ignore configs, show warning.

base/config.c


                else if(!strcmp(variable,"check_for_updates"))
                        /* ignore it for compatibility reasons */
                        logit(NSLOG_CONFIG_WARNING,TRUE,"Warning: check_for_updates variable ignored. Icinga Core does not support update checking");
                        continue;

                else if(!strcmp(variable,"bare_update_check"))
                        /* ignore it for compatibility reasons */
                        logit(NSLOG_CONFIG_WARNING,TRUE,"Warning: bare_update_check variable ignored. Icinga Core does not support update checking");
                        continue;

drop check_for_nagios_update functions in base/utils.c

remove variables:

extern int check_for_updates;
extern int bare_update_check;
extern time_t last_update_check;
extern char *last_program_version;
extern int update_available;
extern char *new_program_version;

base/icinga.c:int check_for_updates=DEFAULT_CHECK_FOR_UPDATES;
base/icinga.c:int bare_update_check=DEFAULT_BARE_UPDATE_CHECK;
base/icinga.c:time_t last_update_check=0L;

base/events.c: check_for_nagios_updates(FALSE,TRUE);

base/utils.c:extern int check_for_updates;
base/utils.c:extern int bare_update_check;
base/utils.c:extern time_t last_update_check;

include/icinga.h:int check_for_nagios_updates(int,int); /* checks to see if new version of Icinga are available */
include/icinga.h:int query_update_api(void); /* checks to see if new version of Icinga are available */

base/icinga.c:time_t last_update_check=0L;
base/utils.c:extern time_t last_update_check;
Binary file base/xretention-base.o matches
Binary file base/xstatusdata-base.o matches
html/includes/utils.inc.php: "last_update_check" => "",
html/includes/utils.inc.php: if(isset($sfc['info']['last_update_check'])){
html/includes/utils.inc.php: $updateinfo["last_update_check"]=$sfc['info']['last_update_check'];
html/includes/utils.inc.php: if(isset($rfc['info']['last_update_check'])){
html/includes/utils.inc.php: $updateinfo["last_update_check"]=$rfc['info']['last_update_check'];
grep: module/icinga-api/icinga-api: No such file or directory
t/var/status.dat: last_update_check=1242341791
t-tap/test_nagios_config.c:time_t last_update_check=0L;
t-tap/test_timeperiods.c:time_t last_update_check=0L;
t-tap/test_icinga_config.c:time_t last_update_check=0L;
t-tap/smallconfig/retention.dat:last_update_check=0
xdata/xsddefault.c:extern time_t last_update_check;
xdata/xsddefault.c: fprintf(fp,"\tlast_update_check=%lu\n",last_update_check);
xdata/xrddefault.c:extern time_t last_update_check;
xdata/xrddefault.c: fprintf(fp,"last_update_check=%lu\n",last_update_check);
xdata/xrddefault.c: else if(!strcmp(var,"last_update_check"))
xdata/xrddefault.c: last_update_check=strtoul(val,NULL,10);

sample-config/icinga.cfg.in:check_for_updates=0
sample-config/icinga.cfg.in:bare_update_check=1

look in t/ too

drop this, remove php dendency from cgi/html

html/includes/utils.inc.php:function get_update_information(){
html/includes/utils.inc.php: "found_update_info" => false,
html/includes/utils.inc.php: "last_update_check" => "",
html/includes/utils.inc.php: if(isset($mcfc['check_for_updates']) && $mcfc['check_for_updates']"0")
html/includes/utils.inc.php: if(isset($sfc['info']['last_update_check'])){
html/includes/utils.inc.php: $updateinfo["last_update_check"]=$sfc['info']['last_update_check'];
html/includes/utils.inc.php: $updateinfo["found_update_info"]=true;
html/includes/utils.inc.php: if($updateinfo["found_update_info"]true)
html/includes/utils.inc.php: if(isset($rfc['info']['last_update_check'])){
html/includes/utils.inc.php: $updateinfo["last_update_check"]=$rfc['info']['last_update_check'];
html/includes/utils.inc.php: $updateinfo["found_update_info"]=true;

docs:

docbook/de/configmain.xml:

check\_for\_updates=<0/1> docbook/de/configmain.xml: check\_for\_updates=1 docbook/de/configmain.xml: bare\_update\_checks=<0/1> docbook/de/configmain.xml: bare\_update\_checks=0

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-09-17 09:21:15 +00:00

  • remove utils.inc.php from web
  • drop any occurence of php in html/
  • remove php dependency for gui

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-09-17 11:45:28 +00:00

php is currently needed for extended search, maybe we can remove that too?

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2010-09-20 07:56:10 +00:00

  • Status changed from New to Resolved
  • Done % changed from 0 to 100

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant