Bug 842991 - stickshift_facts.rb and libra.rb should be merged to avoid duplicate facts
Summary: stickshift_facts.rb and libra.rb should be merged to avoid duplicate facts
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-25 08:49 UTC by Johnny Liu
Modified: 2015-05-14 22:56 UTC (History)
4 users (show)

Fixed In Version: devenv_1932
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-15 14:24:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Johnny Liu 2012-07-25 08:49:25 UTC
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):
devenv_1910

How reproducible:
Always

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.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Mrunal Patel 2012-08-01 18:45:25 UTC
libra.rb has been removed as part of mcollective cleanup.

Comment 2 Johnny Liu 2012-08-03 04:39:52 UTC
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.

Comment 3 Mike McGrath 2013-02-13 19:46:56 UTC
/etc/cron.minutely/openshift-facts should be marked as config(noreplace) in the openshift-origin-msg-node-mcollective rpm as well.

Comment 4 Jhon Honce 2013-02-16 19:36:28 UTC
Fixed in https://github.com/openshift/origin-server/pull/1385

# rpm -q -c \
openshift-origin-msg-node-mcollective-1.5.2-1.git.5588.1a58084.el6.noarch
/etc/cron.minutely/openshift-facts

Comment 5 openshift-github-bot 2013-02-16 20:27:28 UTC
Commit pushed to master at https://github.com/openshift/origin-server

https://github.com/openshift/origin-server/commit/1a5808455af3e2c810ad7290c11ab202cb7e2331
Bug 842991 - Do not replace /etc/cron.minutely/openshift-facts when installing new rpm.

* Ops may update this file via their normal procedures

Comment 6 Jianwei Hou 2013-02-17 02:49:12 UTC
Verified on devenv_2822
openshift-origin-msg-node-mcollective-1.5.2-1.git.5588.1a58084.el6.noarch

/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
/etc/cron.minutely/openshift-facts

This file did not got overwritten after yum update, moving it to verified.


Note You need to log in before you can comment on or make changes to this bug.