sudo is very slow / hostname is broken #96

Open
opened 2021-02-24 08:24:06 +00:00 by rafael · 12 comments
rafael commented 2021-02-24 08:24:06 +00:00 (Migrated from gitlab.privaz.io)

As a result ansible tasks are timing-out

TASK [privazio.vdc.vrack-firewall : Start firewall services] ***************************************
failed: [compute2] (item=ferm) => {"ansible_loop_var": "item", "item": "ferm", "msg": "The service action failed to execute in the expected time frame (10) and was terminated"}
failed: [compute1] (item=ferm) => {"ansible_loop_var": "item", "item": "ferm", "msg": "The service action failed to execute in the expected time frame (10) and was terminated"}
failed: [manager] (item=ferm) => {"ansible_loop_var": "item", "item": "ferm", "msg": "The service action failed to execute in the expected time frame (10) and was terminated"}
failed: [compute3] (item=ferm) => {"ansible_loop_var": "item", "item": "ferm", "msg": "The service action failed to execute in the expected time frame (10) and was terminated"}
As a result ansible tasks are timing-out ``` TASK [privazio.vdc.vrack-firewall : Start firewall services] *************************************** failed: [compute2] (item=ferm) => {"ansible_loop_var": "item", "item": "ferm", "msg": "The service action failed to execute in the expected time frame (10) and was terminated"} failed: [compute1] (item=ferm) => {"ansible_loop_var": "item", "item": "ferm", "msg": "The service action failed to execute in the expected time frame (10) and was terminated"} failed: [manager] (item=ferm) => {"ansible_loop_var": "item", "item": "ferm", "msg": "The service action failed to execute in the expected time frame (10) and was terminated"} failed: [compute3] (item=ferm) => {"ansible_loop_var": "item", "item": "ferm", "msg": "The service action failed to execute in the expected time frame (10) and was terminated"} ```
rafael commented 2021-02-24 08:45:13 +00:00 (Migrated from gitlab.privaz.io)

changed title from {-Failed to start ferm in pvz3-} to {+sudo is very slow+}

changed title from **{-Failed to start ferm in pvz3-}** to **{+sudo is very slow+}**
rafael commented 2021-02-24 08:45:13 +00:00 (Migrated from gitlab.privaz.io)

changed the description

changed the description
rafael commented 2021-02-24 08:49:52 +00:00 (Migrated from gitlab.privaz.io)
pzops@compute2:~$ time sudo ls

real	0m10.019s
user	0m0.004s
sys	0m0.005s
``` pzops@compute2:~$ time sudo ls real 0m10.019s user 0m0.004s sys 0m0.005s ```
rafael commented 2021-02-24 08:52:16 +00:00 (Migrated from gitlab.privaz.io)

changed title from sudo is very slow to sudo is very slow{+ / hostname is broken+}

changed title from **sudo is very slow** to **sudo is very slow{+ / hostname is broken+}**
rafael commented 2021-02-24 08:53:13 +00:00 (Migrated from gitlab.privaz.io)

apparently the problem is related to not having your hostname in the hosts file,

but a quick look at the /etc/hosts and:

# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
#     /etc/cloud/cloud.cfg or cloud-config from user-data
#
apparently the problem is related to not having your hostname in the hosts file, but a quick look at the /etc/hosts and: ``` # Your system has configured 'manage_etc_hosts' as True. # As a result, if you wish for changes to this file to persist # then you will need to either # a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl # b.) change or remove the value of 'manage_etc_hosts' in # /etc/cloud/cloud.cfg or cloud-config from user-data # ```
rafael commented 2021-02-24 08:57:16 +00:00 (Migrated from gitlab.privaz.io)

this seems to be a maas issue

this seems to be a maas issue
rafael commented 2021-02-24 12:17:09 +00:00 (Migrated from gitlab.privaz.io)

The bottom line here is that the line between MAAS and VDC is not clear.

I would assume that when MAAS delivers a Machine it is out of management...

There is a workaround for this issue which is to set:

preserve_hostname: true

In cloud.cfg

The bottom line here is that the line between MAAS and VDC is not clear. I would assume that when MAAS delivers a Machine it is out of management... There is a workaround for this issue which is to set: ``` preserve_hostname: true ``` In cloud.cfg
rafael (Migrated from gitlab.privaz.io) closed this issue 2021-02-24 12:17:10 +00:00
rafael commented 2021-02-24 14:07:12 +00:00 (Migrated from gitlab.privaz.io)

Still not working, the system will not boot up after changes in cloud-init

Still not working, the system will not boot up after changes in cloud-init
rafael (Migrated from gitlab.privaz.io) reopened this issue 2021-02-24 14:07:13 +00:00
rafael commented 2021-02-27 07:29:48 +00:00 (Migrated from gitlab.privaz.io)

I am now disabling cloud-init after delivering the machine.
however, vrack is not correctly initializing the /etc/hosts
and it needs to be compatible with mesh modification...

I am now disabling cloud-init after delivering the machine. however, vrack is not correctly initializing the /etc/hosts and it needs to be compatible with mesh modification...
rafael commented 2021-02-27 07:33:20 +00:00 (Migrated from gitlab.privaz.io)

mentioned in commit 2fe2562fa3

mentioned in commit 2fe2562fa3f7cfd7885b2a335a6ed46088e0fb52
rafael (Migrated from gitlab.privaz.io) closed this issue 2021-02-27 11:44:33 +00:00
rafael commented 2021-03-04 06:09:29 +00:00 (Migrated from gitlab.privaz.io)

mentioned in issue #101

mentioned in issue #101
rafael (Migrated from gitlab.privaz.io) reopened this issue 2021-03-10 10:32:15 +00:00
rafael commented 2021-03-10 10:33:37 +00:00 (Migrated from gitlab.privaz.io)

this looks like it is not working

on first install did not modify the file

TASK [privazio.vdc.vrack-common : Check if the hostname is present in hosts file] *************************************************************************************************************************
ok: [compute1]
ok: [compute2]
ok: [manager]

I think the logic we added will assume host.maas is still OK, but it its not?

this looks like it is not working on first install did not modify the file ``` TASK [privazio.vdc.vrack-common : Check if the hostname is present in hosts file] ************************************************************************************************************************* ok: [compute1] ok: [compute2] ok: [manager] ``` I think the logic we added will assume host.maas is still OK, but it its not?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
privazio/ansible-collection-vdc#96
No description provided.