Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial run of rsyslog playbook fails #2498

Open
jo-krk opened this issue May 27, 2024 · 2 comments
Open

Initial run of rsyslog playbook fails #2498

jo-krk opened this issue May 27, 2024 · 2 comments

Comments

@jo-krk
Copy link

jo-krk commented May 27, 2024

Hi,

Initial run of rsyslog playbook fails against (target) freshly created Ubuntu 24.04 (server edition) with such error:

TASK [debops.debops.rsyslog : Create required system user] *******************************************************
task path: /home/ansible/.ansible/collections/ansible_collections/debops/debops/roles/rsyslog/tasks/main.yml:52
fatal: [vm-test]: FAILED! => {"changed": false, "msg": "usermod: user syslog is currently used by process 638\n", "name": "syslog", "rc": 8}

More verbose output:

fatal: [vm-test]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
            "append": true,
            "authorization": null,
            "comment": null,
            "create_home": false,
            "createhome": false,
            "expires": null,
            "force": false,
            "generate_ssh_key": null,
            "group": "syslog",
            "groups": [
                ""
            ],
            "hidden": null,
            "home": "/home/syslog",
            "local": null,
            "login_class": null,
            "move_home": false,
            "name": "syslog",
            "non_unique": false,
            "password": null,
            "password_expire_max": null,
            "password_expire_min": null,
            "password_expire_warn": null,
            "password_lock": null,
            "profile": null,
            "remove": false,
            "role": null,
            "seuser": null,
            "shell": "/bin/false",
            "skeleton": null,
            "ssh_key_bits": 0,
            "ssh_key_comment": "ansible-generated on vm-test",
            "ssh_key_file": null,
            "ssh_key_passphrase": null,
            "ssh_key_type": "rsa",
            "state": "present",
            "system": true,
            "uid": null,
            "umask": null,
            "update_password": "always"
        }
    },
    "msg": "usermod: user syslog is currently used by process 638\n",
    "name": "syslog",
    "rc": 8
}

Workaround is to stop syslog.socket temporary (which triggers rsyslog.service which starts PID 638 mentioned in usermod error message) via systemctl and then run rsyslog playbook which then succeeds and changes something via this particular task.
After that, additional runs of rsyslog playbook succeed without any workarounds (there are no changes detected anymore during this task), so it's only initial run that is affected.

Thanks!

Ansible controller:

  • Ubuntu 22.04 (server edition)
  • ansible-core 2.16.6
  • ansible 9.5.1
  • Debops 3.1.0 (installed via ansible-galaxy)

Target VM (vm-test):

  • Ubuntu 24.04 (server edition)
@nathanpalmer
Copy link

Good to know there is a workaround! I had configured rsyslog__unprivileged: False for newer 24.04 servers to get around this same issue, but was hoping to come back to it at some point to re-enable things. Neither option is great though since it breaks that first site install.

@mathieumd
Copy link
Contributor

So, Debops is still incompatible with Ubuntu 24.04?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants