ansible-workadventure icon indicating copy to clipboard operation
ansible-workadventure copied to clipboard

security : generate new grub config fails

Open pheidrias opened this issue 4 years ago • 4 comments

Hello and thanks for this great playbook!

I'm running into the following trouble:

RUNNING HANDLER [security : generate new grub config] *************************************
fatal: [mydomain.de]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'grub_cfg' is undefined\n\nThe error appears to be in '/home/myuser/ansible/ansible-workadventure/roles/security/handlers/main.yml': line 59, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: \"generate new grub config\"\n  ^ here\n"}

I couldn't find, where grub_cfg should be configured or what the grub cmd-line is supposed to look like :-(... It seems, that the following docker-compose has issues with cgroup - is this related?

What other information can I provide to help?

Reproduction steps:

  • clean debian minimal install via image from netcup.de
  • ssh-copy pub key
  • create vault, edit deployment.yml
  • run ansible

Thanks in advance, pheidrias

pheidrias avatar Apr 18 '21 12:04 pheidrias

Update: I updated grub manually with the information from roles/docker_setup/tasks/setup_docker.yml, to look like: GRUB_CMDLINE_LINUX="net.ifnames=0 transparent_hugepage=never video=1024x768 audit=1 cgroup_enable=memory systemd.unified_cgroup_hierarchy=0 audit=1"

But docker-compose still has problems (probably unrelatedI:

/opt/workadventure# docker-compose up -d
WARNING: The DEBUG_MODE variable is not set. Defaulting to a blank string.
WARNING: The JITSI_URL variable is not set. Defaulting to a blank string.
WARNING: The JITSI_PRIVATE_MODE variable is not set. Defaulting to a blank string.
WARNING: The START_ROOM_URL variable is not set. Defaulting to a blank string.
WARNING: The MAX_PER_GROUP variable is not set. Defaulting to a blank string.
WARNING: The MAX_USERNAME_LENGTH variable is not set. Defaulting to a blank string.
WARNING: The SECRET_JITSI_KEY variable is not set. Defaulting to a blank string.
WARNING: The ADMIN_API_TOKEN variable is not set. Defaulting to a blank string.
WARNING: The JITSI_ISS variable is not set. Defaulting to a blank string.
Starting workadventure_maps_1          ... done
Starting workadventure_messages_1      ... done
Starting workadventure_uploader_1 ... done
Starting workadventure_back_1     ... done
Starting workadventure_front_1    ... done
Starting workadventure_pusher_1   ... done
Creating workadventure_reverse-proxy_1 ... done

I do get a 404 when trying to access "my" workadventure :-(...(subdomains point to my server's IP)

pheidrias avatar Apr 18 '21 13:04 pheidrias

regarding grub: The file is in /etc/default/grub and the Line should be the following:

GRUB_CMDLINE_LINUX="quiet cgroup_enable=memory systemd.unified_cgroup_hierarchy=0"

devnope avatar Apr 20 '21 21:04 devnope

regarding docker: maybe you want to execute docker logs -f workadventure_front_1. It should tell you more about the issue.

What I find irritating, is WARNING: The START_ROOM_URL variable is not set. Defaulting to a blank string. Have a look in the .env-File. It lies right next to your docker-compose.yml. My template is in env.j2. The variables are filled in the deployment.yml .

devnope avatar Apr 20 '21 21:04 devnope

Hello again,

I found the problem with my personal installation - due to too many new applications for letsencrypt I didn't get a new certificate. I did find out with the help of your dockker logs suggestion - thanks!

Nevertheless, the grub-problem with your ansible script remains. Where should "grub_cfg" come from (as it is not set)?

pheidrias avatar Apr 21 '21 19:04 pheidrias