Red Hat Bugzilla – Bug 842991
stickshift_facts.rb and libra.rb should be merged to avoid duplicate facts
Last modified: 2015-05-14 18:56:59 EDT
Description of problem:
Currently there are mcollective fact files, one is stickshift_facts.rb in crankcase repo, another is libra.rb in li repo.
Compare facts defination in these two files, most of them are duplicated, eg: git_repos, node_profile and so on, even some same fact has slight difference (git_repos). These duplicated facts should have an uniqe defination and should merge these duplicated facts to avoid confusion and reduce workload.
Suggest most of facts should be defined in stickshift_facts.rb to consistency with openshift origin, only leave private facts defination in libra.rb.
Another issue is that there are two duplicated cron jobs running in the same instance,
one is /etc/cron.minutely/stickshift-facts, another one is /var/spool/cron/root.
They are doing the same things, so one of them should be removed. Suggest /var/spool/cron/root should be removed to keep consistency with openshift origin.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. check /etc/cron.minutely/stickshift-facts and run "crontab -l" command to find out two same jobs are running.
2. Compare /usr/lib/ruby/site_ruby/1.8/facter/stickshift_facts.rb and /usr/lib/ruby/site_ruby/1.8/facter/libra.rb to find out some duplicated facts are defined.
libra.rb has been removed as part of mcollective cleanup.
Re-test this bug on devenv-stage_228, this bug is fixed partially.
libra.rb is indeed removed, but two same jobs are secheduled in both /etc/cron.minutely/stickshift-facts and /var/spool/cron/root.
/etc/cron.minutely/openshift-facts should be marked as config(noreplace) in the openshift-origin-msg-node-mcollective rpm as well.
Fixed in https://github.com/openshift/origin-server/pull/1385
# rpm -q -c \
Commit pushed to master at https://github.com/openshift/origin-server
Bug 842991 - Do not replace /etc/cron.minutely/openshift-facts when installing new rpm.
* Ops may update this file via their normal procedures
Verified on devenv_2822
/etc/cron.minutely/openshift-facts is marked as a config in openshift-origin-msg-node-mcollective rpm
[root@ip-10-143-182-210 ~]# rpm -qc openshift-origin-msg-node-mcollective
This file did not got overwritten after yum update, moving it to verified.