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

Missing packages - sudo, gnupg, lsb-release #225

Open
hermann-san opened this issue Oct 10, 2023 · 3 comments
Open

Missing packages - sudo, gnupg, lsb-release #225

hermann-san opened this issue Oct 10, 2023 · 3 comments

Comments

@hermann-san
Copy link

hermann-san commented Oct 10, 2023

Hi there,
i've just installed Consul democracy on Debian Bullseye (from Ubuntu server 20.04) and I had some issues with missing packages on Bullseye. After I've installed them, the installer continued

/etc/sudoers file missing - with deploy user entry

missing packages
sudo
apt install sudo
gnupg
apt install gnupg
lsb-release
apt-get update && apt-get install -y lsb-release && apt-get clean all

There are also a few warnings regarding Postsgresql (further down below). I haven't looked into that yet



TASK [system : Update and upgrade apt packages (this may take a few minutes)] *************************************************
fatal: [10.10.8.81]: FAILED! => changed=false 
  module_stderr: |-
    Shared connection to 10.10.8.81 closed.
  module_stdout: |-
    /bin/sh: 1: sudo: not found
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 127




TASK [system : Update and upgrade apt packages (this may take a few minutes)] *************************************************
fatal: [10.10.8.81]: FAILED! => changed=false 
  module_stderr: |-
    Shared connection to 10.10.8.81 closed.
  module_stdout: |-
    /bin/sh: 1: sudo: not found
  msg: |-
    MODULE FAILURE
    See stdout/stderr for the exact error
  rc: 127


 
  
  TASK [system : Add Node key] **************************************************************************************************
fatal: [10.10.8.81]: FAILED! => changed=false 
  msg: 'Failed to find required executable "gpg" in paths: /usr/local/bin:/usr/bin:/bin:/usr/games:/sbin:/usr/sbin:/usr/local/sbin'

TASK [system : Get distribution codename] *************************************************************************************
fatal: [10.10.8.81]: FAILED! => changed=true 
  cmd: lsb_release -c --short
  delta: '0:00:00.002573'
  end: '2023-10-10 22:40:25.932705'
  msg: non-zero return code
  rc: 127
  start: '2023-10-10 22:40:25.930132'
  stderr: '/bin/sh: 1: lsb_release: not found'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>






ASK [postgresql : Create PostgreSQL database] ********************************************************************************
[WARNING]: Using world-readable permissions for temporary files Ansible needs to create when becoming an unprivileged user.
This may be insecure. For information on securing this, see https://docs.ansible.com/ansible-
core/2.12/user_guide/become.html#risks-of-becoming-an-unprivileged-user
changed: [10.10.8.81] => changed=true 
  db: consul_production
  executed_commands:
  - CREATE DATABASE "consul_production"
  
  
  TASK [postgresql : Create PostgreSQL users] ***********************************************************************************
[WARNING]: Using world-readable permissions for temporary files Ansible needs to create when becoming an unprivileged user.
This may be insecure. For information on securing this, see https://docs.ansible.com/ansible-
core/2.12/user_guide/become.html#risks-of-becoming-an-unprivileged-user
changed: [10.10.8.81] => changed=true 
  queries:
  - 'CREATE USER "********" WITH ENCRYPTED PASSWORD %(password)s '
  - GRANT TEMPORARY, CREATE, CONNECT ON DATABASE "consul_production" TO "********"
  user: VALUE_SPECIFIED_IN_NO_LOG_PARAMETER

TASK [postgresql : Create the shared extensions schema] ***********************************************************************
[WARNING]: Using world-readable permissions for temporary files Ansible needs to create when becoming an unprivileged user.
This may be insecure. For information on securing this, see https://docs.ansible.com/ansible-
core/2.12/user_guide/become.html#risks-of-becoming-an-unprivileged-user
changed: [10.10.8.81] => changed=true 
  queries:
  - CREATE SCHEMA "shared_extensions" AUTHORIZATION "deploy"
  schema: shared_extensions

TASK [postgresql : Add PostgreSQL extensions] *********************************************************************************
[WARNING]: Using world-readable permissions for temporary files Ansible needs to create when becoming an unprivileged user.
This may be insecure. For information on securing this, see https://docs.ansible.com/ansible-
core/2.12/user_guide/become.html#risks-of-becoming-an-unprivileged-user
ok: [10.10.8.81] => (item=plpgsql) => changed=false 
  ansible_loop_var: item
  db: consul_production
  ext: plpgsql
  item: plpgsql
  queries: []
  
@hermann-san hermann-san changed the title Missing packages sudo, gnupg, lsb-release Missing packages - sudo, gnupg, lsb-release Oct 10, 2023
@javierm
Copy link
Member

javierm commented Oct 10, 2023

Hi, @hermann-san 😄.

i've just installed Consul democracy on Debian Bullseye (from Ubuntu server 20.04)

I'm not sure I understand this statement 🤔. How exactly are you installing Debian (first time I hear about a Debian distribution coming without sudo 😮)? Are you installing it on Ubuntu using Docker or something like that?

@hermann-san
Copy link
Author

hermann-san commented Oct 10, 2023

Hi @javierm Javi
it's Debian (debian-11.7.0-arm64-netinst.iso) on Proxmox in a LXC Container. That's where Consul is installed.

I'm using a Ubuntu 20.04 server VM with Ansible to run the installer from.

So there are 4 issues that caused the installer to stop.

  1. missing sudoers file with "deploy" user entry

  2. missing sudo package

  3. missing gnupg package

  4. missing lsb-release package

  5. postgres warnings (installer didn't stop)

So maybe the above issues are a LXC container specific things then

@javierm
Copy link
Member

javierm commented Oct 16, 2023

@hermann-san The postgreSQL warnings happen on every platform. The missing packages seem to be LXC container specific since they're usually installed by default.

We could change the installer to install these packages anyway. The only tricky one is the sudoers file, since currently the first thing we do is adding a user, and for that we assume that sudo is already installed 🤔.

Thanks for reporting!

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

2 participants