Description of problem: mmopenshift fails to log namespace information for additional gears added after user varialbes exist in an application. Version-Release number of selected component (if applicable): rubygem-openshift-origin-controller-1.31.5.1-1.el6op.noarch rsyslog7-mmopenshift-7.4.10-3.el6op.x86_64 How reproducible: Always Steps to Reproduce: 0.- configure mmopenshift with defaults as per the Admin Guide 1.- create a scalable app rhc app create -s myapp ruby-1.9 2.- add a custom env var to it rhc set-env MYVAR=something -a myapp 3.- add new gears to the app. Either by scaling it up: rhc cartridge scale -a myapp ruby-1.9 2 or add a DB: rhc cartridge add -a myapp mysql-5.5 Actual results: rsyslog messages coming from the new gears lack namespace information (ns is empty) 2015-03-17T05:02:48.264634-04:00 vm ruby[22631]: app=myapp ns= appUuid=5507ed80e659c552f8000022 gearUuid=5507edaae659c552f8000045 [Tue Mar 17 05:02:48 2015] [notice] Apache/2.2.15 (Unix) Phusion_Passenger/3.0.21 configured -- resuming normal operations 2015-03-17T05:07:59.752681-04:00 vm mysql[26778]: app=myapp ns= appUuid=5507ed80e659c552f8000022 gearUuid=5507eedde659c552f8000055 150317 5:07:59 [Note] /opt/rh/mysql55/root/usr/libexec/mysqld: ready for connections. Expected results: New gears should log namespace details Additional info: When an application has user variables, Application#calculate_ops adds a PatchUserEnvVarsOp that pushes them to the new gear via rsync when OPENSHIFT_NAMESPACE is still not available in the new gear's env. This rsync triggers a log entry when the namespace information is not yet available inside the gear: Mar 17 05:07:49 vm rsyslogd-3000: mmopenshift: error opening file /var/lib/openshift/5507eedde659c552f8000055/.env/OPENSHIFT_NAMESPACE: No such file or directory 2015-03-17T05:07:49.191439-04:00 vm oo-trap-user[26400]: app=myapp ns= appUuid=5507ed80e659c552f8000022 gearUuid=5507eedde659c552f8000055 oo_login: None from: 192.168.122.184 gearUuid=5507eedde659c552f8000055 cmd=rsync --server -prSe.iLs --delete . .env/user_vars The available information for the gear is added to mmopenshift's gear info hash/cache (without namespace information) and all subsequent messages from that gear (uid) have an empty ns, until rsyslog is restarted (and information from gears has to be cached again).
Verified and pass with the package in brew 1) rpm package [root@broker ~]# rpm -qa|grep syslog7 rsyslog7-mmopenshift-7.4.10-3.el6op.bz1202705.1.x86_64 rsyslog7-7.4.10-3.el6_6.x86_64 2) create scale application and scale up gear, and check the syslog message, the ns field are set correctly. cat /var/log/openshift_gears May 18 15:47:32 broker mysql[12388]: app=myapp ns=anlidom appUuid=555998714add7114b7000030 gearUuid=555999054add7114b7000065 150518 15:47:32 [Note] /opt/rh/mysql55/root/usr/libexec/mysqld: ready for connections. May 18 15:47:32 broker mysql[12388]: app=myapp ns=anlidom appUuid=555998714add7114b7000030 gearUuid=555999054add7114b7000065 150518 15:47:32 [Note] /opt/rh/mysql55/root/usr/libexec/mysqld: ready for connections. [root@broker ~]# cat /var/log/messages|grep "ns= " [root@broker ~]#
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1463.html