cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martijn Koster (JIRA)" <>
Subject [jira] [Commented] (CLOUDSTACK-4556) "12.10. Creating a Linux Template" sethostname script problems
Date Sun, 08 Mar 2015 12:19:38 GMT


Martijn Koster commented on CLOUDSTACK-4556:

Pierre-Luc: this bug is rather old. I ran into problems with the current 4.4 sethostname script
from the docs too; that's described in the last paragraph of

>  "12.10. Creating a Linux Template" sethostname script problems
> ---------------------------------------------------------------
>                 Key: CLOUDSTACK-4556
>                 URL:
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Doc
>    Affects Versions: 4.1.1
>            Reporter: Martijn Koster
>            Assignee: Pierre-Luc Dion
> In the nightly build doc
> section "12.10. Creating a Linux Template", there is a sethostname script, which has
several issues:
> The script appears to assume that it is called once, and that at that time the dhcp leases
file has info in it.
> What I've seen happen is that the first time it is invoked, the leases file is empty,
and the script then destroys
> /etc/hosts and /etc/hostname because it does no checking, and the second time when the
leases file has the required info, the hostname is no longer "localhost", so the script is
skipped. And this approach is strange anyway: the script goes through effort to extract values
from the leases file, but it doesn't need to -- they are passed in by dhclient.
> It calls "dpkg-reconfig" on
which should be "dpkg-reconfigure" on my ubuntu 12.04 instance:
> root@test3:~# which dpkg-reconfig
> root@test3:~# which dpkg-reconfigure
> /usr/sbin/dpkg-reconfigure
> root@test3:~# uname -a
> Linux test3 3.5.0-23-generic #35~precise1-Ubuntu SMP Fri Jan 25 17:13:26 UTC 2013 x86_64
x86_64 x86_64 GNU/Linux
> It would also be nice to set DEBIAN_FRONTEND=noninteractive such that dpkg-reconfigure
doesn't cause debconf frontend warnings in the log.
> In
it sets user/group execute permissions for the script, but that is not required. dhclient-script(8)
documents "invoked using the ´.´ command", and the other scripts in the /etc/dhcp/dhclient-exit-hooks.d/
directory have mode 644.
> I'm working on an alternative in which appears
to work but could do with some more testing.

This message was sent by Atlassian JIRA

View raw message