scylladb / scylla-ansible-roles

Ansible roles for deploying and managing Scylla, Scylla-Manager and Scylla-Monitoring
44 stars 38 forks source link

start_service set to false is not honored anymore #183

Closed tarzanek closed 1 year ago

tarzanek commented 1 year ago

It seems we lost ability to skip starting of Scylla nodes after provisioning

this needs to be brought back (e.g. replace dead nodes is very hard without this)

tarzanek commented 1 year ago

after checking logs

17:18:19  TASK [ansible-scylla-node : start scylla on seeders] ***************************
17:18:19  skipping: [XXX] => {"changed": false, "skip_reason": "Conditional result was False"}
17:18:24  TASK [ansible-scylla-node : Start scylla non-seeds nodes serially] *************
17:18:24  skipping: [xxxx] => (item=xxxx)  => {"ansible_loop_var": "item", "changed": false, "item": "xxxx", "skip_reason": "Conditional result was False"}

so it means the service is started by SOMETHING else later in the game ?!?!?

tarzanek commented 1 year ago

maybe the agent? if its service depends on Scylla it will start it ... ????

tarzanek commented 1 year ago

yep ... agent starts it as dependency /lib/systemd/system/scylla-manager-agent.service


[Unit]
Description=Scylla Manager Agent
Wants=scylla-server.service
Wants=scylla-helper.slice
After=scylla-server.service
After=network-online.target

so https://github.com/scylladb/scylla-ansible-roles/blob/master/ansible-scylla-node/tasks/manager_agents.yml#L57 cannot be started if Scylla start is false ...

this needs fixing of the condition

tarzanek commented 1 year ago

reopening this condition in https://github.com/scylladb/scylla-ansible-roles/pull/185 didn't work needs more work

tarzanek commented 1 year ago

OK so there are handlers that trigger agent start:

https://github.com/scylladb/scylla-ansible-roles/blob/master/ansible-scylla-node/handlers/main.yml

they also shall not run if service start is false

tarzanek commented 1 year ago

OK, so https://github.com/scylladb/scylla-ansible-roles/blob/365a23dabb8fcd07a44654660847d37824e33a51/ansible-scylla-node/tasks/Debian.yml#L109 calls notify which then pushes the handler to the end of play

tarzanek commented 1 year ago

ok, above was added due to https://github.com/scylladb/scylla-ansible-roles/issues/55 so we need to make sure after upgrade agent is restarted

tarzanek commented 1 year ago

ok, now above worked :-)