monkinetic the blog

Daily Digest for Friday, Jul 25, 2014

☀️ Earliest posts come first.

Steve Ivy

monkinetic: Another View of Privilege http://t.co/i4fv7nSHcS

~ # 00:23 ~

Steve Ivy

@lhawthorn Got to discussing your talk with my wife tonight. Thanks for sharing it with us. More thoughts here http://t.co/QEy2QzoHhU

~ # 03:59 ~

Steve Ivy

@linode won’t add an ip for my node “for service separation”. What’s it for then?

~ # 12:42 ~

Steve Ivy

@bitprophet you mean the exultation mixed with mind-numbing chagrin?

~ # 18:10 ~

Steve Ivy

I quietly smile beneath headphones At coworkers in the hall They’ll never know my joy I’m listening to Weird Al

#donttell

~ # 18:23 ~

Steve Ivy

@bitprophet torn between Alan Cumming-style “I’m invincible” and elephant-man “I’m hideous don’t look at me”. #opslife

~ # 18:25 ~

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

-e “show databases;”

Which return:

Step 10 : RUN ps aux | grep mysql</pwd>
Steve Ivy

monkinetic: Docker, Openstack, policy-rc.d, mysqld http://t.co/hqFTd3tsWK

~ # 19:23 ~

Steve Ivy

Anyone know MySQL on @docker and can help? http://t.co/WnReyof7g7

~ # 19:26 ~

Steve Ivy

@biocuriosity @GlennF ICQ number

~ # 19:56 ~