From: Alexandre DERUMIER <aderumier@odiso.com>
To: Loic Dachary <loic@dachary.org>
Cc: Mehdi Abaakouk <sileht@sileht.net>,
ceph-devel <ceph-devel@vger.kernel.org>
Subject: Re: cloud-init resolv.conf updates
Date: Fri, 12 Jun 2015 07:57:58 +0200 (CEST) [thread overview]
Message-ID: <772082321.966971.1434088678294.JavaMail.zimbra@oxygem.tv> (raw)
In-Reply-To: <1985953708.961395.1434085304287.JavaMail.zimbra@oxygem.tv>
Looking at resolvconf cloud-init src:
https://github.com/number5/cloud-init/blob/74e61ab27addbfcceac4eba254f739ef9964b0ed/cloudinit/config/cc_resolv_conf.py
" As Debian/Ubuntu will, by default, utilize
# resovlconf, and similarly RedHat will use sysconfig, this module is
# likely to be of little use unless those are configured correctly.
"
...
"distros = ['fedora', 'rhel', 'sles']"
...
"def handle(name, cfg, cloud, log, _args):
"""
Handler for resolv.conf
@param name: The module name "resolv-conf" from cloud.cfg
"
I have check inside debian /etc/cloud/cloud.cfg, resolv-conf is not in the list of the modules.
I think that because ubuntu use resolvconf by default (which create a symlink /etc/resolv.conf),
the resolv-conf module is not used
----- Mail original -----
De: "aderumier" <aderumier@odiso.com>
À: "Loic Dachary" <loic@dachary.org>
Cc: "Mehdi Abaakouk" <sileht@sileht.net>, "ceph-devel" <ceph-devel@vger.kernel.org>
Envoyé: Vendredi 12 Juin 2015 07:01:44
Objet: Re: cloud-init resolv.conf updates
Hi Loic,
I'm always playing with cloudinit currently,
and I never can get working resolv_conf module too (with configdrive datasource)
Finaly, I manage it with this configdrive:
/latest/meta_data.json
{
"uuid": "c5240fed-76a8-48d9-b417-45b46599d999",
"network_config" :{ "content_path": "/content/0000"}
}
/content/0000
auto eth0
iface eth0 inet static
address x.X.X.X
netmask 255.255.255.0
gateway X.X.X.X
dns-nameservers X.X.X.X
dns-search mydomain
The config is at debian format, but each cloud-init agent on different os parse it,
and transform it to correct distro format. (/sysconfig/.. for redhat).
----- Mail original -----
De: "Loic Dachary" <loic@dachary.org>
À: "Mehdi Abaakouk" <sileht@sileht.net>
Cc: "ceph-devel" <ceph-devel@vger.kernel.org>
Envoyé: Jeudi 11 Juin 2015 23:37:39
Objet: cloud-init resolv.conf updates
Hi Mehdi,
I tried to
manage_resolv_conf: true
resolv_conf:
nameservers: ['8.8.4.4', '8.8.8.8']
but did not get any result and according to /var/log/cloud-init.log it does not seem to be taken into account.
It looks like this is still an open issue according to
https://answers.launchpad.net/ubuntu/+source/cloud-init/+question/234041
https://bugs.launchpad.net/cloud-init/+bug/1394061
even when you get past the misleading example that spells manage-resolv-conf instead of manag_resolv_conf at
http://cloudinit.readthedocs.org/en/stable/topics/examples.html#configure-an-instances-resolv-conf
It looks like there would be a need to add
cloud_config_modules:
- resolv_conf
according to http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/doc/examples/cloud-config.txt#L300 but I don't know which modules I need and which are optional and if the list is going to be merged with the default or override.
so I ended up doing:
#cloud-config
bootcmd:
- echo "nameserver 10.0.3.31" | sudo tee -a /etc/resolvconf/resolv.conf.d/head
- sudo resolvconf -u
Which works for Ubuntu 14.04 but isn't going to work for every operating system ;-)
I'm sure you faced something similar in the past and I'd very much appreciate a pointer in the right direction.
Cheers
--
Loïc Dachary, Artisan Logiciel Libre
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-06-12 5:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-11 21:37 cloud-init resolv.conf updates Loic Dachary
2015-06-12 5:01 ` Alexandre DERUMIER
2015-06-12 5:57 ` Alexandre DERUMIER [this message]
2015-06-12 7:17 ` Loic Dachary
2015-06-12 8:02 ` Alexandre DERUMIER
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=772082321.966971.1434088678294.JavaMail.zimbra@oxygem.tv \
--to=aderumier@odiso.com \
--cc=ceph-devel@vger.kernel.org \
--cc=loic@dachary.org \
--cc=sileht@sileht.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.