On Thu, Mar 10, 2016 at 09:47:29PM +0100, you (Jorge Schrauwen) sent the 
following to [smartos-discuss] :
> 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.

Thanks for this workaround Jorge!
These private settings seems to have been introduced with 7.2 and I only
tried commenting out these private settings in the relevant service
files in /usr/lib/systemd/system/ but that didn't have the right effect.
I now know you're supposed to copy over service file(s) from /usr/lib into 
/etc/systemd/ if you plan on
applying overrides but I didn't know that at the time.

-- 
Marco van Lienen -- Unix SysAdmin -- http://lordsith.net/
https://keybase.io/scarcry , GnuPG id: 8580E6CB
"The Tuck Pendleton machine...zero defects."


-------------------------------------------
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