Hey All,

I've been playing around with SaltStack 2016.3 on the CentOS 7 lx-dataset images. As I made some changes to that version I wanted to test. Stuff like setting timezone, hostname,... is broken.

This is due to the lack of a lot of cgroups suppport, but there is a 'easy' workaround.

---
## disable some functions because lx-brand (TODO: remove once implemented)
      for svc in systemd-timedated systemd-hostnamed; do
        override_dir=/etc/systemd/system/${svc}.service.d
        override_svc=${override_dir}/override.conf
        mkdir -p ${override_dir}

        echo "[Service]" > ${override_svc}
        echo "PrivateTmp=no" >> ${override_svc}
        echo "PrivateDevices=no" >> ${override_svc}
        echo "PrivateNetwork=no" >> ${override_svc}
        echo "ProtectSystem=no" >> ${override_svc}
        echo "ProtectHome=no" >> ${override_svc}

        systemctl daemon-reload
        systemctl restart ${svc}
      done
---

This created 2 override files for systemd-hostnamed and systemd-timedated, it forces off some of the 'protections' that depend on the not support cgroups bits.

These changes are persistent even if the package updates the .service file. (yay!)

After placing the 2 override files and reloading + restarting the service the following 2 tools work again. hostnamectl and timedatectl.

Hopefully this is useful for some of you, it would also be nice to have this in the images that get pulled down.

Regards

Jorge


-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to