Code Monkey home page Code Monkey logo

dokken-images's Introduction

Test Kitchen

Gem Version Build Status

Website https://kitchen.ci/
Source Code https://kitchen.ci/docs/getting-started/introduction/
Slack #test-kitchen channel on Chef Community Slack

Test Kitchen is an integration tool for developing and testing infrastructure code and software on isolated target platforms.

Getting Started Guide

To learn how to install and setup Test Kitchen for developing infrastructure code, check out the Getting Started Guide.

If you want to get going super fast, then try the Quick Start next...

Quick Start

Test Kitchen is a RubyGem and can be installed with:

gem install test-kitchen

If you use Bundler, you can add gem "test-kitchen" to your Gemfile and make sure to run bundle install.

Next add support to your library, Chef cookbook, or empty project with kitchen init:

kitchen init

A kitchen.yml file will be created in your project base directory. This file describes your testing configuration; what you want to test and on which target platforms. Each of these suite and platform combinations are called instances. By default your instances will be converged with Chef Solo and run in Vagrant virtual machines.

Get a listing of your instances with:

kitchen list

Run Chef Infra Client on an instance, in this case default-ubuntu-2004, with:

kitchen converge default-ubuntu-2004

Destroy all instances with:

kitchen destroy

You can clone a Chef Infra cookbook project that contains Test Kitchen support and run through all the instances in serial by running:

kitchen test

Usage

There is help included with the kitchen help subcommand which will list all subcommands and their usage:

kitchen help test

More verbose logging for test-kitchen can be specified when running test-kitchen from the command line using:

kitchen test -l debug

For the provisioner (e.g. chef-solo or chef-infra) add a log_level item to the provisioner section of the .kitchen.yml For more information on setting log_level see the configuration documentation.

Documentation

Documentation is being added on the Test Kitchen website. Please read and contribute to improve them!

Versioning

Test Kitchen aims to adhere to Semantic Versioning 2.0.0.

Community and Ecosystem

If you would like to see a few of the plugins or ecosystem helpers, please look at ECOSYSTEM.md.

Development

Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Authors

Created by Fletcher Nichol ([email protected]).

Maintained by Chef Software and a growing community of contributors.

License

Apache License, Version 2.0 (see LICENSE)

dokken-images's People

Contributors

basil avatar bmhughes avatar chasebolt avatar damacus avatar dependabot[bot] avatar firefishy avatar gardar avatar hrak avatar hunter86bg avatar jsirex avatar kmf avatar naomireeves avatar ramereth avatar shoekstra avatar sinfomicien avatar someara avatar tas50 avatar xorima avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dokken-images's Issues

Ubuntu 16.04 - Failed to connect to bus: No such file or directory

πŸ‘» Brief Description

systemd is not available on Ubuntu 16.04

Version

latest Docker Image from DockerHub

Environment

  • Mac OSX Monterey v12.6.8
  • Docker Desktop v4.22.0

Scenario

Attempt to work with systemd on Ubuntu 16.04

Steps to Reproduce

Consider simple .kitchen.yml config:

---
driver:
  name: dokken
  provision: true
  use_sudo: false
  privileged: true
  pull_chef_image: true
  pull_platform_image: true
  clean_dokken_sandbox: true
  use_cache: true
  pid_one_command: /bin/systemd

transport:
  name: dokken

provisioner:
  name: dokken

platforms:
  - name: ubuntu-16.04
    driver:
      image: dokken/ubuntu-16.04
  - name: ubuntu-18.04
    driver:
      image: dokken/ubuntu-18.04

suites:
  - name: default

Expected Result

systemctl status doesn't report Failed to connect to bus: No such file or directory error...

Actual Result

$ kitchen list
Instance             Driver  Provisioner  Verifier  Transport  Last Action    Last Error
default-ubuntu-1604  Dokken  Dokken       Busser    Dokken     <Not Created>  <None>
default-ubuntu-1804  Dokken  Dokken       Busser    Dokken     <Not Created>  <None>
  • Ubuntu 16.04 reports error:
$ kitchen create default-ubuntu-1604 && kitchen login default-ubuntu-1604
-----> Starting Test Kitchen (v3.5.0)
-----> Creating <default-ubuntu-1604>...
/opt/cinc-workstation/embedded/lib/ruby/gems/3.1.0/gems/lockfile-2.1.3/lib/lockfile.rb:308: warning: finalizer references object to be finalized
/opt/cinc-workstation/embedded/lib/ruby/gems/3.1.0/gems/lockfile-2.1.3/lib/lockfile.rb:308: warning: finalizer references object to be finalized
       Creating kitchen sandbox at /Users/dkd-golman/.dokken/kitchen_sandbox/ec676a802f-default-ubuntu-1604
       Creating verifier sandbox at /Users/dkd-golman/.dokken/verifier_sandbox/ec676a802f-default-ubuntu-1604
       Building work image..
       Creating container ec676a802f-default-ubuntu-1604
       Finished creating <default-ubuntu-1604> (0m36.79s).
-----> Test Kitchen is finished. (0m37.54s)
root@dokken:/# dpkg -l | grep systemd
ii  libsystemd0:amd64         229-4ubuntu21.31  amd64             systemd utility library
ii  systemd                   229-4ubuntu21.31  amd64             system and service manager
ii  systemd-sysv              229-4ubuntu21.31  amd64             system and service manager - SysV links
root@dokken:/# ps aux |grep systemd
root         1  0.2  0.0  36436  1876 ?        Ss   17:56   0:00 /bin/systemd
root        26  0.0  0.0  11288  1016 pts/0    S+   17:56   0:00 grep --color=auto systemd
root@dokken:/# systemctl status
Failed to connect to bus: No such file or directory
root@dokken:/# logout
  • Ubuntu 18.04 just fine:
$ kitchen create default-ubuntu-1804 && kitchen login default-ubuntu-1804
-----> Starting Test Kitchen (v3.5.0)
-----> Creating <default-ubuntu-1804>...
/opt/cinc-workstation/embedded/lib/ruby/gems/3.1.0/gems/lockfile-2.1.3/lib/lockfile.rb:308: warning: finalizer references object to be finalized
/opt/cinc-workstation/embedded/lib/ruby/gems/3.1.0/gems/lockfile-2.1.3/lib/lockfile.rb:308: warning: finalizer references object to be finalized
       Creating kitchen sandbox at /Users/dkd-golman/.dokken/kitchen_sandbox/ec676a802f-default-ubuntu-1804
       Creating verifier sandbox at /Users/dkd-golman/.dokken/verifier_sandbox/ec676a802f-default-ubuntu-1804
       Building work image..
       Creating container ec676a802f-default-ubuntu-1804
       Finished creating <default-ubuntu-1804> (0m3.13s).
-----> Test Kitchen is finished. (0m3.86s)
root@dokken:/# dpkg -l | grep systemd
ii  dbus-user-session         1.12.2-1ubuntu1.4 amd64             simple interprocess messaging system (systemd --user int
ii  libnss-systemd:amd64      237-3ubuntu10.57  amd64             nss module providing dynamic user and group name resolut
ii  libpam-systemd:amd64      237-3ubuntu10.57  amd64             system and service manager - PAM module
ii  libsystemd0:amd64         237-3ubuntu10.57  amd64             systemd utility library
ii  networkd-dispatcher       1.7-0ubuntu3.5    all               Dispatcher service for systemd-networkd connection statu
ii  systemd                   237-3ubuntu10.57  amd64             system and service manager
ii  systemd-sysv              237-3ubuntu10.57  amd64             system and service manager - SysV links
root@dokken:/# ps aux |grep systemd
root         1  0.8  0.1  76972  8316 ?        Ss   17:57   0:00 /bin/systemd
root        25  0.4  0.1  78196  9632 ?        S<s  17:57   0:00 /lib/systemd/systemd-journald
systemd+    32  0.2  0.0  70500  4804 ?        Ss   17:57   0:00 /lib/systemd/systemd-resolved
message+    37  0.1  0.0  49936  4084 ?        Ss   17:57   0:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --no
root       106  0.0  0.0  61700  2824 ?        Ss   17:57   0:00 /lib/systemd/systemd-timedated
root       131  0.0  0.0  11472  1104 pts/0    S+   17:57   0:00 grep --color=auto systemd
root@dokken:/# systemctl status
● dokken
    State: running
     Jobs: 0 queued
   Failed: 0 units
    Since: Wed 2023-08-23 17:57:20 UTC; 21s ago
   CGroup: /
           β”œβ”€init.scope
           β”‚ β”œβ”€  1 /bin/systemd
           β”‚ β”œβ”€109 /bin/bash -login -i
           β”‚ β”œβ”€132 systemctl status
           β”‚ └─133 (pager)
           └─system.slice
             β”œβ”€cron.service
             β”‚ └─35 /usr/sbin/cron -f
             β”œβ”€systemd-timedated.service
             β”‚ └─106 /lib/systemd/systemd-timedated
             β”œβ”€networkd-dispatcher.service
             β”‚ └─36 /usr/bin/python3 /usr/bin/networkd-dispatcher --run-startup-triggers
             β”œβ”€systemd-journald.service
             β”‚ └─25 /lib/systemd/systemd-journald
             β”œβ”€systemd-resolved.service
             β”‚ └─32 /lib/systemd/systemd-resolved
             └─dbus.service
               └─37 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root@dokken:/# logout

Ubuntu-18.04 image package list/state appears out of date

In the course of trying to install git:

STDERR: E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/c/curl/libcurl3-gnutls_7.58.0-2ubuntu3.7_amd64.deb  404  Not Found [IP: 91.189.88.149 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
---- End output of ["apt-get", "-q", "-y", "--allow-downgrades", "-o", "Dpkg::Options::=--force-confdef", "-o", "Dpkg::Options::=--force-confold", "install", "git=1:2.17.1-1ubuntu0.4"] ----
Ran ["apt-get", "-q", "-y", "--allow-downgrades", "-o", "Dpkg::Options::=--force-confdef", "-o", "Dpkg::Options::=--force-confold", "install", "git=1:2.17.1-1ubuntu0.4"] returned 100

Docker images versions?

πŸ—£οΈ Foreword

Thank for taking the time to fill this feature request fully. Without it we may not be able to , and the issue may be closed without resolution.

πŸ™ Problem Statement

I'm building a Chef cookbook which uses Docker, so I'd like to have the docker command available.

❔ Possible Solution

Would be great to:

  • Either have a -docker version of the images which installs Docker and make it available with dokken
  • Either install docker in each images

‴️ Describe alternatives you've considered

I don't really see any yet.

βž• Additional context

None

CentOS 6 image build failures

Current docker image builds are failing with this error:

#1 [internal] load git source https://github.com/test-kitchen/dokken-images.git#187af307e92346d8cfc693d62040dd0fb69d6ff1
#1 0.108 hint: Using 'master' as the name for the initial branch. This default branch name
#1 0.108 hint: is subject to change. To configure the initial branch name to use in all
#1 0.108 hint: of your new repositories, which will suppress this warning, call:
#1 0.108 hint: 
#1 0.108 hint: 	git config --global init.defaultBranch <name>
#1 0.108 hint: 
#1 0.108 hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
#1 0.108 hint: 'development'. The just-created branch can be renamed via this command:
#1 0.108 hint: 
#1 0.108 hint: 	git branch -m <name>
#1 0.109 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/
#1 0.127 fatal: Not a valid object name 187af307e92346d8cfc693d62040dd0fb69d6ff1^{commit}
#1 0.759 From https://github.com/test-kitchen/dokken-images
#1 0.759  * [new branch]      feature/multi-arch -> origin/feature/multi-arch
#1 0.759  * [new branch]      master             -> origin/master
#1 0.759  * [new branch]      someara/chefdk     -> origin/someara/chefdk
#1 DONE 0.9s

#2 [internal] load metadata for docker.io/library/centos:6
#2 ...

#3 [auth] library/centos:pull token for registry-1.docker.io
#3 DONE 0.0s

#2 [internal] load metadata for docker.io/library/centos:6
#2 DONE 0.5s

#4 [1/5] FROM docker.io/library/centos:6@sha256:a93df2e96e07f56ea48f215425c6f1673ab922927894595bb5c0ee4c5a955133
#4 resolve docker.io/library/centos:6@sha256:a93df2e96e07f56ea48f215425c6f1673ab922927894595bb5c0ee4c5a955133 done
#4 sha256:ff50d722b38227ec8f2bbf0cdbce428b66745077c173d8117d91376128fa532e 9.44MB / 69.84MB 0.2s
#4 sha256:ff50d722b38227ec8f2bbf0cdbce428b66745077c173d8117d91376128fa532e 18.87MB / 69.84MB 0.3s
#4 sha256:ff50d722b38227ec8f2bbf0cdbce428b66745077c173d8117d91376128fa532e 32.51MB / 69.84MB 0.5s
#4 sha256:ff50d722b38227ec8f2bbf0cdbce428b66745077c173d8117d91376128fa532e 52.43MB / 69.84MB 0.6s
#4 sha256:ff50d722b38227ec8f2bbf0cdbce428b66745077c173d8117d91376128fa532e 66.06MB / 69.84MB 0.8s
#4 sha256:ff50d722b38227ec8f2bbf0cdbce428b66745077c173d8117d91376128fa532e 69.84MB / 69.84MB 0.9s
#4 sha256:ff50d722b38227ec8f2bbf0cdbce428b66745077c173d8117d91376128fa532e 69.84MB / 69.84MB 1.1s done
#4 extracting sha256:ff50d722b38227ec8f2bbf0cdbce428b66745077c173d8117d91376128fa532e
#4 extracting sha256:ff50d722b38227ec8f2bbf0cdbce428b66745077c173d8117d91376128fa532e 2.2s done
#4 DONE 3.2s

#5 [2/5] RUN sed -i '/mirrorlist/d' /etc/yum.repos.d/*.repo
#5 DONE 1.1s

#6 [3/5] RUN sed -i -e 's/#baseurl/baseurl/g' /etc/yum.repos.d/*.repo
#6 DONE 0.1s

#7 [4/5] RUN sed -i -e 's/mirror.centos.org\/centos\/\$releasever/vault.centos.org\/6.10/g' /etc/yum.repos.d/*.repo
#7 DONE 0.1s

#8 [5/5] RUN yum -y install     ca-certificates     cronie     curl     dmidecode     gnupg2     initscripts     iptables     iputils     lsof     nc     net-tools     nmap     openssl     passwd     procps     redhat-lsb-core     strace     sudo     tcpdump     telnet     upstart     util-linux     vim-minimal     wget     which &&     yum clean all &&     rm -rf /var/cache/yum &&     rm -rf /var/log/*
#8 0.161 Loaded plugins: fastestmirror, ovl
#8 0.291 Setting up Install Process
#8 15.37 http://vault.centos.org/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2600:1f13:2e7:2901:d2b0:c3b2:9347:934c: Cannot assign requested address"
#8 15.37 Trying other mirror.
#8 15.37 Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
#8 ERROR: process "/bin/sh -c yum -y install     ca-certificates     cronie     curl     dmidecode     gnupg2     initscripts     iptables     iputils     lsof     nc     net-tools     nmap     openssl     passwd     procps     redhat-lsb-core     strace     sudo     tcpdump     telnet     upstart     util-linux     vim-minimal     wget     which &&     yum clean all &&     rm -rf /var/cache/yum &&     rm -rf /var/log/*" did not complete successfully: exit code: 1
------
 > [5/5] RUN yum -y install     ca-certificates     cronie     curl     dmidecode     gnupg2     initscripts     iptables     iputils     lsof     nc     net-tools     nmap     openssl     passwd     procps     redhat-lsb-core     strace     sudo     tcpdump     telnet     upstart     util-linux     vim-minimal     wget     which &&     yum clean all &&     rm -rf /var/cache/yum &&     rm -rf /var/log/*:
#8 0.161 Loaded plugins: fastestmirror, ovl
#8 0.291 Setting up Install Process
#8 15.37 http://vault.centos.org/6.10/os/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 7 - "Failed to connect to 2600:1f13:2e7:2901:d2b0:c3b2:9347:934c: Cannot assign requested address"
#8 15.37 Trying other mirror.
#8 15.37 Error: Cannot retrieve repository metadata (repomd.xml) for repository: base. Please verify its path and try again
------
./centos-6/Dockerfile:17
--------------------
  16 |     RUN sed -i -e 's/mirror.centos.org\/centos\/\$releasever/vault.centos.org\/6.10/g' /etc/yum.repos.d/*.repo
  17 | >>> RUN yum -y install \
  18 | >>>     ca-certificates \
  19 | >>>     cronie \
  20 | >>>     curl \
  21 | >>>     dmidecode \
  22 | >>>     gnupg2 \
  23 | >>>     initscripts \
  24 | >>>     iptables \
  25 | >>>     iputils \
  26 | >>>     lsof \
  27 | >>>     nc \
  28 | >>>     net-tools \
  29 | >>>     nmap \
  30 | >>>     openssl \
  31 | >>>     passwd \
  32 | >>>     procps \
  33 | >>>     redhat-lsb-core \
  34 | >>>     strace \
  35 | >>>     sudo \
  36 | >>>     tcpdump \
  37 | >>>     telnet \
  38 | >>>     upstart \
  39 | >>>     util-linux \
  40 | >>>     vim-minimal \
  41 | >>>     wget \
  42 | >>>     which && \
  43 | >>>     yum clean all && \
  44 | >>>     rm -rf /var/cache/yum && \
  45 | >>>     rm -rf /var/log/*
  46 |     
--------------------
error: failed to solve: process "/bin/sh -c yum -y install     ca-certificates     cronie     curl     dmidecode     gnupg2     initscripts     iptables     iputils     lsof     nc     net-tools     nmap     openssl     passwd     procps     redhat-lsb-core     strace     sudo     tcpdump     telnet     upstart     util-linux     vim-minimal     wget     which &&     yum clean all &&     rm -rf /var/cache/yum &&     rm -rf /var/log/*" did not complete successfully: exit code: 1
Error: buildx failed with: error: failed to solve: process "/bin/sh -c yum -y install     ca-certificates     cronie     curl     dmidecode     gnupg2     initscripts     iptables     iputils     lsof     nc     net-tools     nmap     openssl     passwd     procps     redhat-lsb-core     strace     sudo     tcpdump     telnet     upstart     util-linux     vim-minimal     wget     which &&     yum clean all &&     rm -rf /var/cache/yum &&     rm -rf /var/log/*" did not complete successfully: exit code: 1

Docker Desktop 4.3.0+ breaks dokken images for CentOS 7

πŸ—£οΈ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

πŸ‘» Brief Description

Docker Desktop 4.3.0 on macOS breaks the dokken image for (at least) centos-7 as it switches to using cgroupv2.

https://docs.docker.com/desktop/mac/release-notes/#bug-fixes-and-minor-changes

Version

Latest version of dokken/centos-7

Environment

macOS 11.6.1
Docker Desktop 4.3.1

Scenario

Attempting to use dokken/centos-7 for running a cookbook which creates a systemd service and fails verification due to systemd not running.

Steps to Reproduce

  1. Install Docker Desktop 4.3.0+ on macOS
  2. Attempt to provision an environment which utilizes systemd

Expected Result

Process should succeed and start systemd service.

Actual Result

           * service[php-fpm] action reload (up to date)

           ================================================================================
           Error executing action `install` on resource 'tg_php_fpm_pool[www]'
           ================================================================================

           Chef::Exceptions::MultipleFailures
           ----------------------------------
           Multiple failures occurred:
           * Chef::Exceptions::ValidationFailed occurred in chef run: systemd_unit[php-fpm.service] (/opt/kitchen/cache/cookbooks/tg_php/resources/fpm_pool.rb line 270) had an error: Chef::Exceptions::ValidationFailed: file[/etc/systemd/system/php-fpm.service] (dynamically defined) had an error: Chef::Exceptions::ValidationFailed: Proposed content for /etc/systemd/system/php-fpm.service failed verification :systemd_unit (Chef::Resource::File::Verification::SystemdUnit)
           * Mixlib::ShellOut::ShellCommandFailed occurred in delayed notification: service[php-fpm] (/opt/kitchen/cache/cookbooks/tg_php/resources/fpm_pool.rb line 323) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
           ---- Begin output of /usr/bin/systemctl --system restart php-fpm ----
           STDOUT:
           STDERR: Failed to get D-Bus connection: No such file or directory
           ---- End output of /usr/bin/systemctl --system restart php-fpm ----
           Ran /usr/bin/systemctl --system restart php-fpm returned 1

βž• Additional context

Add any other context about the problem here. e.g. related issues or existing pull requests.

Ensure CentOS 8 images have a working systemd

πŸ—£οΈ Foreword

Recent systemd on CentOS 8 fail to report service status correctly with certain kernel versions - see https://bugzilla.redhat.com/show_bug.cgi?id=1901449 .

A fix has been released in CentOS 8 stream, systemd-239-44.el8.x86_64. Ensure that the CentOS 8 and CentOS 8 stream images contain at least that version.

Version

Current dokken/centos-8 image (b79efc2c7, 2021-02-23) contains systemd-239-41.

βž• Additional context

inspec/inspec#5398

Using CentOS 8 with kitchen fails

I'm new to kitchen so please let me know if other details are required If I have missed any.

Brief Description

On running kitchen converge with dokken/centos-8 image, it fails with error

sh: /opt/kitchen/run_command: No such file or directory

error

Version

Test Kitchen version: 2.6.0

Environment

OS: macOS Catalina (10.15.5)

kitchen.yml

---
driver:
  name: dokken

transport:
  name: dokken

provisioner:
  name: dokken

verifier:
  name: inspec

platforms:
  - name: ubuntu-20.04
  - name: centos-8
    driver:
      image: dokken/centos-8

suites:
  - name: default
    provisioner:
      policyfile_path: policy.rb
    verifier:
      inspec_tests:
        - test/integration/default
    attributes:

Scenario

Running converge for centos

Steps to Reproduce

Run kitchen converge with the centos 8 image

Expected Result

Should be able to successfully converge.

βž• Additional context

No issues with CentOS 7 image so my guess is something is wrong with the image rather than test-kitchen.

Failed to install Chef Client on CentOS 6 - 'GLIBC_2.14' not found

ChefDK Version: 4.2.0
Host: RHEL 7/CentOS 7
Docker: Docker version 19.03.1, build 74b1e89
Container: dokken/centos-6:latest

Converge of Cookbook in Kitchen with Chef 14.3.37 fails with the following error:

/opt/chef/embedded/bin/ruby: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /opt/chef/embedded/lib/libruby.so.2.5)
/opt/chef/embedded/bin/ruby: /lib64/libc.so.6: version `GLIBC_2.17' not found (required by /opt/chef/embedded/lib/libruby.so.2.5)

Installed version in container dokken/centos-6 is GLIBC_2.12 as by the output of ldd --version:

ldd (GNU libc) 2.12
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

May it possible to upgrade the CentOS 6 Container to include a newer version of GLIBC?

Centos 8 container is missing locales

πŸ‘» Brief Description

Container dokken/centos-8 is missing locales. This prevents various services relying on this to start successfully, eg. PostgreSQL.

Version

Latest container dokken/centos-8.

Environment

Chef Workstation: 20.9.158
Chef Client: 16.5.77
Inspec: 4.23.11
Test Kitchen: 2.7.2

Scenario

Currently I test sous-chefs/postgresql Cookbook, but PostgreSQL fails to start due to missing locales in dokken/centos-8. The following locales are available by default in this container:

[root@dokken /]# locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
C.utf8
POSIX

Steps to Reproduce

  1. create new instance of Container dokken/centos-8
  2. execute command locale -a
  3. Check output. It should match the snippet described above.

Expected Result

It is expected to have at least the same locales available as with dokken/centos-7 container, see below:

[root@dokken /]# locale -a
C
en_AG
en_AG.utf8
en_AU
en_AU.iso88591
en_AU.utf8
en_BW
en_BW.iso88591
en_BW.utf8
en_CA
en_CA.iso88591
en_CA.utf8
en_DK
en_DK.iso88591
en_DK.utf8
en_GB
en_GB.iso88591
en_GB.iso885915
en_GB.utf8
en_HK
en_HK.iso88591
en_HK.utf8
en_IE
en_IE@euro
en_IE.iso88591
en_IE.iso885915@euro
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ
en_NZ.iso88591
en_NZ.utf8
en_PH
en_PH.iso88591
en_PH.utf8
en_SG
en_SG.iso88591
en_SG.utf8
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8
en_ZA
en_ZA.iso88591
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW
en_ZW.iso88591
en_ZW.utf8
POSIX

Actual Result

Current locales (as already described aboved):

[root@dokken /]# locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
C.utf8
POSIX

βž• Additional context

I think this has something to do with glibc-common package. Reinstalling the package, brings back locales for en_US. Hopefully this helps finding the issue.

I also played around with installing glibc-all-langpacks.

See also CentOS/sig-cloud-instance-images#154.

Systemd notify services hangs indefinitely when TimeoutSec=0 due to problems with systemd-notify

πŸ‘» Brief Description

Starting a Systemd service of type notify hangs indefinitely when TimeoutSec=0 was specified. Systemd does not properly export the variable $NOTIFY_SOCKET, so Systemd does not see the notification and as a result it hangs indefinitely. However, this can be avoided by setting TimeoutSec to any positive value, but this will cause Systemd to finish and "think" the service was successfully started. The service process itself, does not notify Systemd successfully. As this is symptom handling, it does not represent a valid option.

This can be reproduced with PostgreSQL service. The service can be started without any problems in vagrant VM provided by Bento project.

Version

Latest container dokken/centos-8.

Environment

Chef Workstation: 20.9.158
Chef Client: 16.5.77
Inspec: 4.23.11
Test Kitchen: 2.7.2

Scenario

It is not possible to start a Systemd service of type notify.

Steps to Reproduce

  1. Create new container dokken/centos-8
  2. Install the PGDG repository RPM using dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm
  3. Disable PostgreSQL module stream using dnf -qy module disable postgresql
  4. Install PostgreSQL using dnf install -y postgresql96-server
  5. Restart PostgreSQL using systemctl restart postgresql-9.6

Expected Result

PostgreSQL restarts successfully using Systemd.

Actual Result

PostgreSQL restart hangs indefinitely using Systemd. However, direct start of PostgreSQL starts without any problems, so this is no Bug in ProstgreSQL itself. It seems that systemd-notify does not work properly, due to any reason. It works in vagrant VM provided by Bento project.

βž• Additional context

Executing the following command explicitly provides a hint to the problem.

[root@dokken /]# systemd-notify --ready
No status data could be sent: $NOTIFY_SOCKET was not set

The socket exists in path /run/systemd/notify.

Using container dokken/centos-7 everything works as expected, the service postgresql-9.6 is able to start successfully.

sudo?

I'm easy ether way on this one being included

Pro:
I've just install sudo on a bunch of images to test user specific stuff with inspec
e.g.

sudo -H -u vagrant bash -c "source /etc/profile.d/rbenv.sh && rbenv install -l"

Con:
It might be an edge use case?

Missing crypt library on Almalinux 9

πŸ—£οΈ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

πŸ‘» Brief Description

While trying to run tests on some of our Chef cookbooks, we get the following error message when it gets to the chef-client run:

/opt/chef/embedded/bin/ruby: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory

Version

Test Kitchen version 3.2.2

Environment

Running Ubuntu 22.04
Chef Workstation 22.4.861

Scenario

Test Chef cookbooks on Almalinux 9

Steps to Reproduce

  1. Create a default cookbook using chef generate cookbook
  2. Change the kitchen.yml file to use dokken and add almalinux-9 as a platform

Expected Result

A successful chef run

Actual Result

mjmjelde@hostname:~/cookbooks/test$ kitchen converge
-----> Starting Test Kitchen (v3.2.2)
-----> Creating <default-almalinux-9>...
/opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/lockfile-2.1.3/lib/lockfile.rb:308: warning: finalizer references object to be finalized
/opt/chef-workstation/embedded/lib/ruby/gems/3.0.0/gems/lockfile-2.1.3/lib/lockfile.rb:308: warning: finalizer references object to be finalized
       Creating kitchen sandbox at /home/mjmjelde/.dokken/kitchen_sandbox/ac19992907-default-almalinux-9
       Creating verifier sandbox at /home/mjmjelde/.dokken/verifier_sandbox/ac19992907-default-almalinux-9
       Building work image..
       Creating container ac19992907-default-almalinux-9
       Finished creating <default-almalinux-9> (0m2.22s).
-----> Converging <default-almalinux-9>...
       Creating kitchen sandbox in /home/mjmjelde/.dokken/kitchen_sandbox/ac19992907-default-almalinux-9
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 7.2.2...
       Removing non-cookbook files before transfer
       Preparing data_bags
       Preparing validation.pem
       Preparing client.rb
       /opt/chef/embedded/bin/ruby: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Converge failed on instance <default-almalinux-9>.  Please see .kitchen/logs/default-almalinux-9.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

βž• Additional context

Installing the package libxcrypt-compat through an intermediate_instruction step fixes the problem. This may also be a problem on the other RHEL 9 based platforms

Run-List doesn't execute for centos-stream-9 when using Podman or Colima instead of Docker Desktop

πŸ—£οΈ Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

πŸ‘» Brief Description

Recently changed from Docker Desktop for Mac due to licensing to use Podman or Colima. We have been testing our cookbooks with centos-stream-9 and Docker Desktop and everything has been fine. Once we migrated to Podman and then Colima thinking this was a bug with those replacements Test-Kitchen looks to have completed successfully after setup but looking at the output nothing 'Chef-wise' is done on the host. It's like you passed the host an empty runlist. Decided to try the Oracle 7 image and it worked as expected, run-list was executed with both Podman and Colima.

Version

Latest Dokken Images
Test Kitchen version: 3.6.0
kitchen-dokken (2.20.3)

Environment

M2 MacBook Pro
Chef Workstation 23.12.1055

Scenario

Trying to get the Centos Stream 9 image to work

Steps to Reproduce

  • Install and setup Podman or Colima
  • Test and verify a cookbook is executed on Centos Steam 9

Expected Result

Runlist to be executed

Actual Result

Test-Kitchen completes successfully without error and the runlist is not executed.

βž• Additional context

kitchen setup centos
-----> Starting Test Kitchen (v3.6.0)
-----> Creating ...
/opt/chef-workstation/embedded/lib/ruby/gems/3.1.0/gems/lockfile-2.1.3/lib/lockfile.rb:308: warning: finalizer references object to be finalized
/opt/chef-workstation/embedded/lib/ruby/gems/3.1.0/gems/lockfile-2.1.3/lib/lockfile.rb:308: warning: finalizer references object to be finalized
Creating kitchen sandbox at /Users/koldrid/.dokken/kitchen_sandbox/72a21bdce4-default-centos-stream-9
Creating verifier sandbox at /Users/koldrid/.dokken/verifier_sandbox/72a21bdce4-default-centos-stream-9
Building work image..
Creating container 72a21bdce4-default-centos-stream-9
Finished creating (0m1.07s).
-----> Converging ...
Creating kitchen sandbox in /Users/koldrid/.dokken/kitchen_sandbox/72a21bdce4-default-centos-stream-9
Preparing dna.json
Resolving cookbook dependencies with Berkshelf 8.0.9...
Removing non-cookbook files before transfer
Preparing data_bags
Preparing environments
Preparing roles
Preparing validation.pem
Preparing client.rb
Finished converging (0m4.15s).
-----> Setting up ...
Finished setting up (0m0.00s).
-----> Test Kitchen is finished. (0m6.06s)

docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
067c275498fb 72a21bdce4-default-centos-stream-9:latest "/usr/lib/systemd/sy…" 2 minutes ago Exited (255) About a minute ago 72a21bdce4-default-centos-stream-9
b197c00adffe chef/chef:18.2.7 "true" 18 hours ago Created chef-18.2.7-linux-amd64

CentOS 8 appears to be corrupt

Scenario:

The CentOS 8 dokken container has a corrupt rpmdb, from a cursory google this may have originated upstream.

Steps to Reproduce:

Create a centos 8 container with the dokken/centos-8 image. rpm commands will return a corrupt rpmdb error. Building the container locally does not exhibit this failure.

Fix

Rebuild the container and push to dockerhub.

Archlinux image?

πŸ—£οΈ Foreword

I didn't find any discussion here if there is interest in additional distros.
That being said, would it be possible to have a Archlinux image? I can make a PR if there's interest in adding Arch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.