cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brent (JIRA)" <>
Subject [jira] [Commented] (CLOUDSTACK-4556) "12.10. Creating a Linux Template" sethostname script problems
Date Sat, 11 Oct 2014 00:12:34 GMT


Brent commented on CLOUDSTACK-4556:

Note:  I have found a workaround for this issue:

Create your cloudstack instance with name "localhost".  Also, make the VM "localhost" during
the installation.  Skip step #4 in the cloudstack ubuntu documentation for templates:   rm
-f /var/lib/dhcp/dhclient.*

This will trick the script into running the script when a new VM is created from the template.

Let me know what you think!

>  "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
> 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