gogs playbook fails without pip3 and pymysql module
jeremy-donson opened this issue · 4 comments
I really like the smart mix of vagrant and ansible....
Two warnings and an error when trying to use your setup for gogs:
[WARNING]: - dependency geerlingguy.git (None) from role geerlingguy.gogs differs from already installed version (3.0.1),
skipping
[DEPRECATION WARNING]: "include" is deprecated, use include_tasks/import_tasks
instead. This feature will be removed in version 2.16. Deprecation warnings can
be disabled by setting deprecation_warnings=False in ansible.cfg.
All runs right until the very end:
fatal: [gogs]: FAILED! => {"changed": false, "msg": "No package matching 'python3-mysqldb' is available"}
I tried to take it literally..... but nope...
$ pip3 install python3-mysqldb
Downloading/unpacking python3-mysqldb
Could not find any downloads that satisfy the requirement python3-mysqldb
The tasks below ran ok,
but they did NOT clear the error: "No package matching 'python3-mysqldb' is available".
Does this fix need to be added to the gogs galaxy role?
- name: Install pip3
become: yes
command: apt-get install python3-pip -y
- name: Install pymysql - import as python3-mysqldb
become: yes
command: pip3 install pymysql
Also, why ubuntu14?
Can the packer vm from which clones are made be destroyed?
because it persists after
$ vagrant destroy -f
Tried the kubernetes vagrantfile+playbook, and got pretty far, but...
TASK [geerlingguy.docker : Install Docker packages (with downgrade option).] ***
fatal: [kube1]: FAILED! => {"cache_update_time": 1670185394, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'docker-ce=5:20.10.73-0ubuntu-xenial' 'docker-ce-cli=5:20.10.73-0ubuntu-xenial' 'docker-ce-rootless-extras=5:20.10.73-0ubuntu-xenial' 'containerd.io=1.4.6-1' --allow-downgrades' failed: E: There were unauthenticated packages and -y was used without --allow-unauthenticated\n", "rc": 100, "stderr": "E: There were unauthenticated packages and -y was used without --allow-unauthenticated\n", "stderr_lines": ["E: There were unauthenticated packages and -y was used without --allow-unauthenticated"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following additional packages will be installed:\n docker-scan-plugin libltdl7 pigz\nSuggested packages:\n aufs-tools cgroupfs-mount | cgroup-lite\nRecommended packages:\n slirp4netns\nThe following NEW packages will be installed:\n containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras\n docker-scan-plugin libltdl7 pigz\n0 upgraded, 7 newly installed, 0 to remove and 76 not upgraded.\nNeed to get 107 MB of archives.\nAfter this operation, 466 MB of additional disk space will be used.\nWARNING: The following packages cannot be authenticated!\n containerd.io docker-ce-cli docker-ce docker-ce-rootless-extras\n docker-scan-plugin\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following additional packages will be installed:", " docker-scan-plugin libltdl7 pigz", "Suggested packages:", " aufs-tools cgroupfs-mount | cgroup-lite", "Recommended packages:", " slirp4netns", "The following NEW packages will be installed:", " containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras", " docker-scan-plugin libltdl7 pigz", "0 upgraded, 7 newly installed, 0 to remove and 76 not upgraded.", "Need to get 107 MB of archives.", "After this operation, 466 MB of additional disk space will be used.", "WARNING: The following packages cannot be authenticated!", " containerd.io docker-ce-cli docker-ce docker-ce-rootless-extras", " docker-scan-plugin"]}
fatal: [kube3]: FAILED! => {"cache_update_time": 1670185394, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'docker-ce=5:20.10.73-0ubuntu-xenial' 'docker-ce-cli=5:20.10.73-0ubuntu-xenial' 'docker-ce-rootless-extras=5:20.10.73-0ubuntu-xenial' 'containerd.io=1.4.6-1' --allow-downgrades' failed: E: There were unauthenticated packages and -y was used without --allow-unauthenticated\n", "rc": 100, "stderr": "E: There were unauthenticated packages and -y was used without --allow-unauthenticated\n", "stderr_lines": ["E: There were unauthenticated packages and -y was used without --allow-unauthenticated"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following additional packages will be installed:\n docker-scan-plugin libltdl7 pigz\nSuggested packages:\n aufs-tools cgroupfs-mount | cgroup-lite\nRecommended packages:\n slirp4netns\nThe following NEW packages will be installed:\n containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras\n docker-scan-plugin libltdl7 pigz\n0 upgraded, 7 newly installed, 0 to remove and 76 not upgraded.\nNeed to get 107 MB of archives.\nAfter this operation, 466 MB of additional disk space will be used.\nWARNING: The following packages cannot be authenticated!\n containerd.io docker-ce-cli docker-ce docker-ce-rootless-extras\n docker-scan-plugin\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following additional packages will be installed:", " docker-scan-plugin libltdl7 pigz", "Suggested packages:", " aufs-tools cgroupfs-mount | cgroup-lite", "Recommended packages:", " slirp4netns", "The following NEW packages will be installed:", " containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras", " docker-scan-plugin libltdl7 pigz", "0 upgraded, 7 newly installed, 0 to remove and 76 not upgraded.", "Need to get 107 MB of archives.", "After this operation, 466 MB of additional disk space will be used.", "WARNING: The following packages cannot be authenticated!", " containerd.io docker-ce-cli docker-ce docker-ce-rootless-extras", " docker-scan-plugin"]}
fatal: [kube2]: FAILED! => {"cache_update_time": 1670185393, "cache_updated": false, "changed": false, "msg": "'/usr/bin/apt-get -y -o "Dpkg::Options::=--force-confdef" -o "Dpkg::Options::=--force-confold" install 'docker-ce=5:20.10.73-0ubuntu-xenial' 'docker-ce-cli=5:20.10.73-0ubuntu-xenial' 'docker-ce-rootless-extras=5:20.10.73-0ubuntu-xenial' 'containerd.io=1.4.6-1' --allow-downgrades' failed: E: There were unauthenticated packages and -y was used without --allow-unauthenticated\n", "rc": 100, "stderr": "E: There were unauthenticated packages and -y was used without --allow-unauthenticated\n", "stderr_lines": ["E: There were unauthenticated packages and -y was used without --allow-unauthenticated"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nThe following additional packages will be installed:\n docker-scan-plugin libltdl7 pigz\nSuggested packages:\n aufs-tools cgroupfs-mount | cgroup-lite\nRecommended packages:\n slirp4netns\nThe following NEW packages will be installed:\n containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras\n docker-scan-plugin libltdl7 pigz\n0 upgraded, 7 newly installed, 0 to remove and 76 not upgraded.\nNeed to get 107 MB of archives.\nAfter this operation, 466 MB of additional disk space will be used.\nWARNING: The following packages cannot be authenticated!\n containerd.io docker-ce-cli docker-ce docker-ce-rootless-extras\n docker-scan-plugin\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "The following additional packages will be installed:", " docker-scan-plugin libltdl7 pigz", "Suggested packages:", " aufs-tools cgroupfs-mount | cgroup-lite", "Recommended packages:", " slirp4netns", "The following NEW packages will be installed:", " containerd.io docker-ce docker-ce-cli docker-ce-rootless-extras", " docker-scan-plugin libltdl7 pigz", "0 upgraded, 7 newly installed, 0 to remove and 76 not upgraded.", "Need to get 107 MB of archives.", "After this operation, 466 MB of additional disk space will be used.", "WARNING: The following packages cannot be authenticated!", " containerd.io docker-ce-cli docker-ce docker-ce-rootless-extras", " docker-scan-plugin"]}
I would gladly help debug the playbooks, and update some of these to Ubuntu20.
However, after trying the same playbook with Ubuntu 20.04 instead of Ubuntu 16.04....
TASK [Gathering Facts] *********************************************************
fatal: [kube1]: UNREACHABLE! => {"changed": false, "msg": "Failed to connect to the host via ssh: Warning: Permanently added '[127.0.0.1]:2222' (ED25519) to the list of known hosts.\r\nvagrant@127.0.0.1: Permission denied (publickey,password).", "unreachable": true}
I seem to have problems with known hosts preventing ansible from connecting in Ubuntu20.
The following in ansible.cfg did not help:
[default]
host_key_checking = false
Likely I need to clear ansible's cache of known hosts?
Does ansible controller share ssh keys with the vagrant user?
Can that vagrant user /.ssh/ dir be configured as follows?
https://kentrichards.net/blog/bypass-knownhosts-file-vagrant-boxes
This looks like the tool for paving the road with regard to k8s node health:
https://github.com/kubernetes/node-problem-detector
In particular, we want to discern an Event from a NodeConditions.
Should we not put testing all of your vagrant/ansible examples on CI/CD?
How about a standard bug report template for k8s cluster nodes?
I would gladly promote you as THE open source ansible guru.
Enjoy your holidays :)
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Please read this blog post to see the reasons why I mark issues as stale.
This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.