d2iq-archive / mesos-deb-packaging

Mesos package for Debian, Ubuntu, CentOS, RHEL, and Fedora
Other
58 stars 66 forks source link

Upgrading mesos 0.27.2 to 1.0.0 with custom work_dir breaks slave startup #85

Open stevenschlansker opened 8 years ago

stevenschlansker commented 8 years ago

We have a custom work_dir set via configuration management:

root@mesos-slave2-qa-sf:~# cat /etc/mesos-slave/work_dir
/mnt/mesos-slave

the mesos package includes this file:

root@mesos-slave2-qa-sf:~# dpkg-query -L mesos | grep /etc/mesos-slave
/etc/mesos-slave
/etc/mesos-slave/work_dir

so when you upgrade, it gets a dpkg-dist file from the new package:

root@mesos-slave3-qa-sf:~# puppet agent -t
Notice: /Stage[main]/Otmesos::Mesos_common/Package[mesos]/ensure: ensure changed '0.27.2-2.0.15.ubuntu1404' to '1.0.0-2.0.89.ubuntu1404'
root@mesos-slave3-qa-sf:~# ls /etc/mesos-slave/work_dir*
/etc/mesos-slave/work_dir  /etc/mesos-slave/work_dir.dpkg-dist

which then gets picked up as a flag to the mesos-slave process:

/usr/bin/mesos-init-wrapper slave -> /usr/bin/mesos-slave ...
Failed to load unknown flag 'work_dir.dpkg-dist'
Usage: mesos-slave [options]
...

which totally sucks! Maybe the package shouldn't manage the file this way? Maybe mesos-init-wrapper should ignore .dpkg-* files?

memelet commented 8 years ago

So this fully breaks upgrading. Any workaround? (Other than for us to delete the file after installing the package that is.)

stevenschlansker commented 8 years ago

Deleting the file via configuration management was our workaround.