Description of problem: The system's timezone is HKT. Threaddump an application, show some messages below: <--snip--> Attempting to tail files: ruby18/logs/error_log-20120907-000000-EST Use ctl + c to stop Could not find any files matching glob <--snip--> Version-Release number of selected component (if applicable): buildvm-devops.usersys.redhat.com/puddle/build/OpenShift/Alpha/2012-08-29.1/DevOps/x86_64/os/Packages/ How reproducible: Always Steps to Reproduce: 1.Check the broker's timezone is not EST. 2.Create an app, then thread dump it 3.Tail the logs of the applications Actual results: step1: [root@broker lib]# date Fri Sep 7 13:56:45 HKT 2012 step2: [root@jiaxuan test]# rhc app create -a ruby18 -t ruby-1.8 -l jia -p jia -d [root@jiaxuan test]# rhc app threaddump -a ruby18 -l jia -p 'jia' -d Contacting https://broker.devops.example.com Response from server: DEBUG: Exit Code: 0 broker_c: ["namespace", "rhlogin", "ssh", "app_uuid", "debug", "alter", "cartridge", "cart_type", "action", "app_name", "api"] api_c: ["placeholder"] API version: 1.1.3 RESULT: Success The thread dump file will be available via: rhc app tail -a 9870bea142 -f 9870bea142/logs/error_log-20120907-000000-EST -o '-n 250' Success The thread dump file will be available via: rhc app tail -a ruby18 -f ruby18/logs/error_log-20120907-000000-EST -o '-n 250' step 3: [root@jiaxuan test]# rhc app tail -a ruby18 -f ruby18/logs/error_log-20120907-000000-EST -o '-n 250' Password: *** Attempting to tail files: ruby18/logs/error_log-20120907-000000-EST Use ctl + c to stop Could not find any files matching glob Expected results: After threaddump an application, the prompt message should be "error_log-20120907-000000-HKT". It should not use hard code. Additional info: via app: [ruby18-jia.devops.example.com logs]\> ls access_log-20120907-000000-HKT error_log-20120907-000000-HKT production.log scale_events.log validate_config.log
Guessing the log's timezone is taken from the node locale, but the broker hardcodes EST. Might be best to just remove the tz from the log file name if that's possible. Or make dynamic, not hardcoded.
I'm actually not sure why the timezone is on the filename. I went ahead and made the returned client message reflect the actual filename (the real server timezone), using `date +%Z`
This has been pushed origin-server/master and to enterprise-server/enterprise-1.1
This is built and now available on http://buildvm-devops.usersys.redhat.com/puddle/build/OpenShiftEnterprise/1.1.x/latest
Verify: (1)server: [root@node etc]# date Wed Dec 12 03:14:40 EST 2012 [root@node etc]# [root@node etc]# pwd /etc [root@node etc]# rm -rf localtime [root@node etc]# ln -s /usr/share/zoneinfo/Asia/Hong_Kong localtime [root@node etc]# date Wed Dec 12 16:15:24 HKT 2012 (2)Client: [root@xjia-client 1212]# rhc app create ruby ruby-1.8 -pjia Creating application 'ruby' =========================== Scaling: no Gear Size: default Namespace: jia1 Cartridge: ruby-1.8 Your application's domain name is being propagated worldwide (this might take a minute)... Initialized empty Git repository in /root/1212/ruby/.git/ done ruby @ http://ruby-jia1.example.com/ ==================================== Application Info ================ Gear Size = small Git URL = ssh://5f7ab8cb11904bfe92f7ccec084415e8.com/~/git/ruby.git/ UUID = 5f7ab8cb11904bfe92f7ccec084415e8 SSH URL = ssh://5f7ab8cb11904bfe92f7ccec084415e8.com Created = 3:17 AM Cartridges ========== ruby-1.8 RESULT: Application ruby was created. [root@xjia-client 1212]# curl http://ruby-jia1.example.com/ >> /dev/null % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 5230 100 5230 0 0 29691 0 --:--:-- --:--:-- --:--:-- 30057 [root@xjia-client 1212]# rhc threaddump -a ruby -pjia Application event 'thread-dump' successful Success The thread dump file will be available via: rhc tail ruby -f ruby-1.8/logs/error_log-20121212-000000-HKT -o '-n 250' [root@xjia-client 1212]# rhc tail ruby -f ruby-1.8/logs/error_log-20121212-000000-HKT -o '-n 250' -pjia [Wed Dec 12 16:17:31 2012] [notice] SELinux policy enabled; httpd running as context system_u:system_r:openshift_t:s0:c0,c505 [Wed Dec 12 16:17:31 2012] [notice] mod_bw : Memory Allocated 32 bytes (each conf takes 32 bytes) [Wed Dec 12 16:17:31 2012] [notice] mod_bw : Version 0.8 - Initialized [1 Confs] [Wed Dec 12 16:17:31 2012] [notice] Digest: generating secret for digest authentication ... Version: OpenShiftEnterprise/1.1.x/2012-12-11.3/
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. http://rhn.redhat.com/errata/RHSA-2013-0220.html