[Bug 1599810] Re: Correct hostname not displayed in syslog after boot

2016-10-18 Thread Ingo Gottwald
OK, maybe I was too quick on this one.
Just did a test with ubuntu-1604-xenial-v20161013 in GCE.

To reproduce, simply boot up a machine from that image and look at the 
/var/log/syslog.
The hostname in the log says "ubuntu" instead of the real machine hostname.

Sending a testlog with "logger testlog1" gives me this line in /var/log/syslog:
Oct 18 08:20:22 ubuntu igottwald: testlog 1

After that I do a "sudo pkill -HUP rsyslogd" and write another testlog with 
"logger testlog 2", then I see in /var/log/syslog:
Oct 18 08:26:32 test-ig1 igottwald: testlog 2

test-ig1 is the correct hostname.

Same is true if you build images with packer on-top of this image. The 
resulting images start with a hostname in the log which looks like 
"packer-bc6a04da-56ea-4982-aed6-664877993834" since this is the method of 
packer choosing random hostnames during image build.
Again once the rsyslogd is HUPed or restarted, the correct hostname is back 
again.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1599810

Title:
  Correct hostname not displayed in syslog after boot

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/1599810/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1599810] Re: Correct hostname not displayed in syslog after boot

2016-10-18 Thread Ingo Gottwald
I originally saw this in /var/log/syslog of all my GCE machines that were built 
on-top of ubuntu-1604-xenial-v20160610 and older.
See also this bug-report: 
https://github.com/GoogleCloudPlatform/compute-image-packages/issues/290

I'm now running machines off the image ubuntu-1604-xenial-v20160907a
where I can't reproduce the problem any more.

** Bug watch added: 
github.com/GoogleCloudPlatform/compute-image-packages/issues #290
   https://github.com/GoogleCloudPlatform/compute-image-packages/issues/290

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1599810

Title:
  Correct hostname not displayed in syslog after boot

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/1599810/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1023389] Re: service nginx status is confusing when nginx is not running

2012-07-13 Thread Ingo Gottwald
Sorry guys I think this is going the wrong way.
I know the service state recognition method from ansible very well because i 
recently patched it...

Ansible running on ubuntu tries to get the running state form upstart if it's 
an upstart script. (Not the case here)
On the next step it tries to get the Service state by return Code.
Next Fallback is the output of the script.

Nginx returns an exit 4 through LSB status_of_proc function that means the 
status is unknwon.
Which is correct in this case because of one little detail.
The LSB status_of_proc get's called like this:
status_of_proc -p /var/run/$NAME.pid $DAEMON nginx  exit 0 || exit $?

Which to my knowledge advices status_of_proc to explicitly check the status by 
the PID file.
Since the PID File is cleaned up in the stopping routine, an exit 4 is the 
correct answer of the LSB function.
It simply can't recognize the state by the PID File because it's not there.

If you use the LSB function like this:
status_of_proc $DAEMON nginx  exit 0 || exit $?

The return code of a stopped nginx process will return 3 which is the correct 
value for a stopped process according to LSB documentation:
http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1023389

Title:
  service nginx status is confusing when nginx is not running

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nginx/+bug/1023389/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs