@biocuriosity @GlennF ICQ number
Archive for July 25, 2014
page 1 of 1
Docker, Openstack, policy-rc.d, mysqld
I'm working on building a Docker image that I can use with Jenkins to run tests on some code. That code interacts with an Openstack install in the container to run the tests.
I'm using a variation of this cloudgear install script to install Openstack, an approach that seems to work well on Vagrant VMs, but it's failing wildly in a Docker container.
The issue I'm on right now is that mysql-server won't start. I tried starting (and restarting) it manually in my Dockerfile with RUN service mysql start
after mysql is installed but always get a policy-rc.d error.
> invoke-rc.d: policy-rc.d denied execution of start.
I dug in and found that Docker's ubuntu includes a policy-rc.d
file that simply returns 101 (not allowed) for any service that tries to start/restart after installation.
#!/bin/sh
exit 101
So... not sure why this is set up this way but I'll go with it. I changed my Dockerfile to rewrite the policy-rc.d
file:
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d
The 0
return code is basically a heard-coded "yes" for installed services to run. I tried re-building my image with this new file, and while I am no longer getting the "denied execution" errors mysql still is not starting (confirmed with a couple of test operations that run after the install):
RUN apt-get install mysql-server python-mysqldb mysql-client-5.5 -y
RUN ps aux | grep mysql
RUN mysql -uroot -p
Which return:
Step 10 : RUN ps aux | grep mysql</pwd>
@bitprophet torn between Alan Cumming-style "I'm invincible" and elephant-man "I'm hideous don't look at me #opslife
I quietly smile beneath headphones At coworkers in the hall They'll never know my joy I'm listening to Weird Al
@lhawthorn Got to discussing your talk with my wife tonight. Thanks for sharing it with us. More thoughts here http://t.co/QEy2QzoHhU
page 1 of 1