Description of problem: In /usr/sbin/oo-last-access `load_apps_data`, it only could recognize uuid with length of 24-32 and consist of [0-9a-f] ... 76 # If filename is a length 24-32 uuid, then it is an app 77 if file_name =~ /^[0-9a-f]{24,32}$/ 78 read_app_data(file_name) 79 end Version-Release number of selected component (if applicable): 2.2/2014-12-09.1 openshift-origin-node-util-1.32.2.1-1.el6op.noarch How reproducible: always Steps to Reproduce: 1.Enable USE_PREDICTABLE_GEAR_UUIDS in broker.conf, create an app on the node which is using mod-rewrite frontend. Visit the app, the access action could be record in /var/log/httpd/openshift_log 2.Run oo-last-access [root@node1 ~]# oo-last-access ERROR : No gears were found in the log files. Check log file locations Actual results: Expected results: The command should work well. Additional info:
The interesting thing is oo-last-access could work on a node which is using vhost. Seems `add_alias_data` in /usr/sbin/oo-last-access helps to find correct gear uuid by chance.
Checking whether the dir fits a regex strikes me as a bad way to determine whether it's a gear. Especially now that the gear UUID could be almost anything.
https://github.com/openshift/origin-server/pull/6018
Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/dd28b1706b9ce6affc89bb429935cc57b7a4cca3 oo-last-access: fix gear UUID detection oo-last-access previously created a table of known gears by looking for entries in /var/lib/openshift that looked like gear UUIDs. Now that UUIDs can look different, some were not being added to the table. This commit updates the logic to include all gears. Bug 1172548 - oo-last-access does not accept gear uuid when USE_PREDICTABLE_GEAR_UUIDS="true" https://bugzilla.redhat.com/show_bug.cgi?id=1172548
Verify the bug with openshift-origin-node-util-1.34.0.1-1 1. Make sure broker has enabled USE_PREDICTABLE_GEAR_UUIDS=TRUE in broker.conf. Create an app. Visit the app. The access log was recorded in /var/log/httpd/openshift_log on the node: [root@node2 ~]# tailf /var/log/httpd/openshift_log 10.**.**.** app1-123.ose22-manual.com.cn - - [26/Jan/2015:10:33:07 +0800] "GET / HTTP/1.1" 200 39627 "-" "curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2" (3856us) - 127.3.223.1:8080/ 54c5a694e5fed513c6000009 123-app1-1 2. Run 'oo-last-access' on the node. [root@node2 ~]# oo-last-access [root@node2 .last_access]# cat 123-app1-1 26/Jan/2015:10:33:07 +0800 This is working fine on both vhost and mod-rewrite frontend.
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-0220.html