CentOS 7 Template issue

Henry

Member
Jan 1, 2016
83
0
6
52
I have created a CT using the CentOS7 template.

When I try to set the timezone it fails as per:

set-timezone Australia/Melbourne
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to set time zone: Connection timed out

I have removed the CT and recreated it with the same result.

The template is labelled
centos-7-default_20150829_amd64.tar.gz
 
AFAIK CentOS7 uses systemd, so the correct way to change that is:

# timedatectl set-timezone Australia/Melbourne
 
Hi. I seem to be having a similar problem to Henry. I'm trying to install spacewalk on centos 7 using the guide from their documentation. In LXC containers, the script that sets up the database fails when trying to turn on postgresql, like so:

[root@spacewalk ~]# systemctl enable postgresql.service
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to execute operation: Connection timed out

(service postgresql start redirects to systemctl start postgresql.service, so the same error happens when i try that.)

I tried in a VM using a centos 7 iso, and systemctl works fine. So there is a difference between how systemctl is working on the VM and in the CT

I had a theory that there might be some package on the VM that was allowing systemctl to work there and not on the relatively slimmed down container. So I diffed the output of yum list installed on both machines, and installed all the missing packages from the vm onto the container (including the unnecessary kernel and firmware packages, but whatever). Even after making sure both systems had the same packages and rebooting the container, systemctl still throws that error when trying to start postgres.

Does anyone have any idea why this might be breaking in a container?

I'm using PVE 4.1 with ZFS storage, if that matters.

Update: installing postgresql by itself on a fresh centos machine doesn't seem to yield this error, so there must be some incompatibility with the spacewalk guide, centos 7, and lxc. Probably unrelated to Henry's post so sorry for bumping.
 
Last edited: