Edit dnsmasq.conf within cobbler on Fuel 5.1.1

Asked by Claude Durocher

I need to change the line "server=/local/" in the dnsmasq configuration of Fuel. Here's what I tried :

1- ssh login to fuel node
2- dockerctl shell cobbler
3- edit /etc/cobbler/dnsmasq.template and make the required changes
4- cobbler sync
5- change is reflected in /etc/dnamasq.conf correctly
6- exit from the container and the fuel node

However, when I reboot the fuel node, my changes to /etc/cobbler/dnsmasq.template are gone.

How can i make the changes permanent?

Edit: I filled a bug as this is related to Puppet : https://bugs.launchpad.net/fuel/+bug/1411425

Question information

Language:
English Edit question
Status:
Solved
For:
Fuel for OpenStack Edit question
Assignee:
No assignee Edit question
Solved by:
Claude Durocher
Solved:
Last query:
Last reply:
Revision history for this message
Bartłomiej Piotrowski (bpiotrowski) said :
#1

To modify a container and keep desired changes, you need to commit them. I have tested it on 6.1 nightly build 10 minutes ago, but the whole procedure looks similiar on previous releases:

1. dockerctl shell cobbler
2. Make your changes here and log out to return to the master node shell.
3. Check container and image names with "docker ps | grep cobbler".
4. Commit your changes with "docker commit fuel-core-6.1-cobbler fuel/cobbler_6.1:latest".

After reboot your changes will be still there.

Revision history for this message
Claude Durocher (claude-d) said :
#2

I understand it's a workaround but my question remains : shouldn't we
have the value enterred as part of fuel setup (in my case,
'openstack.myorg.local') in the dnsmasq file instead of the default
'local' for the domain and server parameters?

Le 2015-01-23 04:11, Bartlomiej Piotrowski a écrit :
> Your question #260791 on Fuel for OpenStack changed:
> https://answers.launchpad.net/fuel/+question/260791
>
> Status: Open => Answered
>
> Bartlomiej Piotrowski proposed the following answer:
> To modify a container and keep desired changes, you need to commit them.
> I have tested it on 6.1 nightly build 10 minutes ago, but the whole
> procedure looks similiar on previous releases:
>
> 1. dockerctl shell cobbler
> 2. Make your changes here and log out to return to the master node shell.
> 3. Check container and image names with "docker ps | grep cobbler".
> 4. Commit your changes with "docker commit fuel-core-6.1-cobbler fuel/cobbler_6.1:latest".
>
> After reboot your changes will be still there.
>

--
Claude

Revision history for this message
Bartłomiej Piotrowski (bpiotrowski) said :
#3

It should be fixed, you're correct – the progress will be tracked in the bug you filled earlier.

Revision history for this message
Claude Durocher (claude-d) said :
#4

It's not working. Here's what I tried :

dockerctl shell cobbler
vi /etc/cobbler/dnsmasq.template
 ==> server=/local/10.10.1.4
cobbler sync
/etc/init.d/dnsmasq restart
exit
docker ps | grep cobbler
docker commit fuel-core-6.0-cobbler fuel/cobbler_6.0:latest
reboot

dockerctl shell cobbler
cat /etc/cobbler/dnsmasq.template

Change to file (server=/local/10.10.1.4) is gone.

Revision history for this message
Claude Durocher (claude-d) said :
#5

OK, I finally found the right syntax for commiting a Docker image (need to specify the <container numeric id> ):

dockerctl shell cobbler
vi /etc/cobbler/dnsmasq.template
 ==> server=/local/10.10.1.4
cobbler sync
/etc/init.d/dnsmasq restart
exit
docker ps
docker commit <CONTAINER ID> fuel/cobbler_6.0:latest
reboot

Revision history for this message
Claude Durocher (claude-d) said :
#6

Please note that /etc/cobbler/dnsmasq.template is modified by puppet when the docker instance is initiated so the procedure decribed in this page is invalid.