diff --git a/inventory/dynamic/gcp/group_vars/all/00_defaults.yml b/inventory/dynamic/gcp/group_vars/all/00_defaults.yml index 9dfd9f6e0b6..fe575d29530 100644 --- a/inventory/dynamic/gcp/group_vars/all/00_defaults.yml +++ b/inventory/dynamic/gcp/group_vars/all/00_defaults.yml @@ -20,7 +20,7 @@ openshift_master_cluster_hostname: "internal-openshift-master.{{ public_hosted_z openshift_master_cluster_public_hostname: "openshift-master.{{ public_hosted_zone }}" openshift_master_default_subdomain: "{{ wildcard_zone }}" -mcd_port: 49500 +mcd_port: 22623 mcd_endpoint: "https://{{ openshift_master_cluster_public_hostname }}:{{ mcd_port }}" # Cloud specific settings diff --git a/playbooks/init/basic_facts.yml b/playbooks/init/basic_facts.yml index 56dbff542d6..0fe5790bc43 100644 --- a/playbooks/init/basic_facts.yml +++ b/playbooks/init/basic_facts.yml @@ -47,7 +47,7 @@ hosts: "{{ l_init_fact_hosts | default('nodes') }}:!masters:!bootstrap" tasks: - set_fact: - openshift_bootstrap_endpoint: "https://{{ openshift_install_config['metadata']['name'] }}-api.{{ openshift_install_config['baseDomain'] }}:49500/config/worker" + openshift_bootstrap_endpoint: "https://{{ openshift_install_config['metadata']['name'] }}-api.{{ openshift_install_config['baseDomain'] }}:22623/config/worker" when: - openshift_install_config_path is defined - openshift_bootstrap_endpoint is not defined @@ -56,7 +56,7 @@ hosts: "{{ l_init_fact_hosts | default('nodes') }}:&masters" tasks: - set_fact: - openshift_bootstrap_endpoint: "https://{{ openshift_install_config['metadata']['name'] }}-api.{{ openshift_install_config['baseDomain'] }}:49500/config/master" + openshift_bootstrap_endpoint: "https://{{ openshift_install_config['metadata']['name'] }}-api.{{ openshift_install_config['baseDomain'] }}:22623/config/master" when: - openshift_install_config_path is defined - openshift_bootstrap_endpoint is not defined diff --git a/roles/container_runtime/tasks/package_crio.yml b/roles/container_runtime/tasks/package_crio.yml index 2f1f162a07d..34c9f926fdd 100644 --- a/roles/container_runtime/tasks/package_crio.yml +++ b/roles/container_runtime/tasks/package_crio.yml @@ -46,11 +46,19 @@ - /etc/cni/net.d/200-loopback.conf - /etc/cni/net.d/100-crio-bridge.conf -- name: Create the CRI-O configuration - template: +- name: Set pause_image to pod image + ini_file: + dest: /etc/crio/crio.conf + section: "crio.image" + option: pause_image + value: '"{{ openshift_crio_pause_image }}"' + +- name: Set pause_command to pod cmd + ini_file: dest: /etc/crio/crio.conf - src: crio.conf.j2 - backup: yes + section: "crio.image" + option: pause_command + value: ' "/usr/bin/pod"' - name: Update crictl.yaml runtime-endpoint yedit: @@ -89,6 +97,18 @@ state: restarted daemon_reload: yes register: start_result + ignore_errors: true + +- when: start_result is failed + block: + - name: Get crio logs + command: journalctl --no-pager -u crio + register: crio_logs + ignore_errors: true + - debug: + msg: "{{ crio_logs.stdout_lines }}" + - fail: + msg: crio start failed. # If we are using crio only, docker.service might not be available for # 'docker login' diff --git a/roles/container_runtime/templates/crio.conf.j2 b/roles/container_runtime/templates/crio.conf.j2 deleted file mode 100644 index 417e78ad430..00000000000 --- a/roles/container_runtime/templates/crio.conf.j2 +++ /dev/null @@ -1,166 +0,0 @@ -# {{ ansible_managed }} - -# The "crio" table contains all of the server options. -[crio] - -# root is a path to the "root directory". CRIO stores all of its data, -# including container images, in this directory. -root = "/var/lib/containers/storage" - -# run is a path to the "run directory". CRIO stores all of its state -# in this directory. -runroot = "/var/run/containers/storage" - -# storage_driver select which storage driver is used to manage storage -# of images and containers. -storage_driver = "overlay" - -# storage_option is used to pass an option to the storage driver. -storage_option = [ -{% if ansible_distribution in ['RedHat', 'CentOS'] %} - "overlay.override_kernel_check=1" -{% endif %} -] - -# The "crio.api" table contains settings for the kubelet/gRPC -# interface (which is also used by crioctl). -[crio.api] - -# listen is the path to the AF_LOCAL socket on which crio will listen. -listen = "/var/run/crio/crio.sock" - -# stream_address is the IP address on which the stream server will listen -stream_address = "" - -# stream_port is the port on which the stream server will listen -stream_port = "10010" - -# file_locking is whether file-based locking will be used instead of -# in-memory locking -file_locking = false - -# The "crio.runtime" table contains settings pertaining to the OCI -# runtime used and options for how to set up and manage the OCI runtime. -[crio.runtime] - -# runtime is the OCI compatible runtime used for trusted container workloads. -# This is a mandatory setting as this runtime will be the default one -# and will also be used for untrusted container workloads if -# runtime_untrusted_workload is not set. -runtime = "/usr/bin/runc" - -# runtime_untrusted_workload is the OCI compatible runtime used for untrusted -# container workloads. This is an optional setting, except if -# default_container_trust is set to "untrusted". -runtime_untrusted_workload = "" - -# default_workload_trust is the default level of trust crio puts in container -# workloads. It can either be "trusted" or "untrusted", and the default -# is "trusted". -# Containers can be run through different container runtimes, depending on -# the trust hints we receive from kubelet: -# - If kubelet tags a container workload as untrusted, crio will try first to -# run it through the untrusted container workload runtime. If it is not set, -# crio will use the trusted runtime. -# - If kubelet does not provide any information about the container workload trust -# level, the selected runtime will depend on the default_container_trust setting. -# If it is set to "untrusted", then all containers except for the host privileged -# ones, will be run by the runtime_untrusted_workload runtime. Host privileged -# containers are by definition trusted and will always use the trusted container -# runtime. If default_container_trust is set to "trusted", crio will use the trusted -# container runtime for all containers. -default_workload_trust = "trusted" - -# no_pivot instructs the runtime to not use pivot_root, but instead use MS_MOVE -no_pivot = false - -# conmon is the path to conmon binary, used for managing the runtime. -conmon = "/usr/libexec/crio/conmon" - -# conmon_env is the environment variable list for conmon process, -# used for passing necessary environment variable to conmon or runtime. -conmon_env = [ - "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", -] - -# selinux indicates whether or not SELinux will be used for pod -# separation on the host. If you enable this flag, SELinux must be running -# on the host. -selinux = true - -# seccomp_profile is the seccomp json profile path which is used as the -# default for the runtime. -seccomp_profile = "/etc/crio/seccomp.json" - -# apparmor_profile is the apparmor profile name which is used as the -# default for the runtime. -apparmor_profile = "crio-default" - -# cgroup_manager is the cgroup management implementation to be used -# for the runtime. -cgroup_manager = "systemd" - -# hooks_dir_path is the oci hooks directory for automatically executed hooks -hooks_dir_path = "/usr/share/containers/oci/hooks.d" - -# default_mounts is the mounts list to be mounted for the container when created -default_mounts = [ - "/usr/share/rhel/secrets:/run/secrets", -] - -# pids_limit is the number of processes allowed in a container -pids_limit = 1024 - -# log_size_max is the max limit for the container log size in bytes. -# Negative values indicate that no limit is imposed. -log_size_max = 52428800 - -# The "crio.image" table contains settings pertaining to the -# management of OCI images. -[crio.image] - -# default_transport is the prefix we try prepending to an image name if the -# image name as we receive it can't be parsed as a valid source reference -default_transport = "docker://" - -# pause_image is the image which we use to instantiate infra containers. -pause_image = "{{ openshift_crio_pause_image }}" - -# pause_command is the command to run in a pause_image to have a container just -# sit there. If the image contains the necessary information, this value need -# not be specified. -pause_command = "/usr/bin/pod" - -# signature_policy is the name of the file which decides what sort of policy we -# use when deciding whether or not to trust an image that we've pulled. -# Outside of testing situations, it is strongly advised that this be left -# unspecified so that the default system-wide policy will be used. -signature_policy = "" - -# image_volumes controls how image volumes are handled. -# The valid values are mkdir and ignore. -image_volumes = "mkdir" - -# CRI-O reads its configured registries defaults from the containers/image configuration -# file, /etc/containers/registries.conf. Modify registries.conf if you want to -# change default registries for all tools that use containers/image. If you -# want to modify just crio, you can change the registies configuration in this -# file. - -# insecure_registries is used to skip TLS verification when pulling images. -# insecure_registries = [] - -# registries is used to specify a comma separated list of registries to be used -# when pulling an unqualified image (e.g. fedora:rawhide). -registries = ['docker.io'] - -# The "crio.network" table contains settings pertaining to the -# management of CNI plugins. -[crio.network] - -# network_dir is where CNI network configuration -# files are stored. -network_dir = "/etc/cni/net.d/" - -# plugin_dir is where CNI plugin binaries are stored. -plugin_dir = "/opt/cni/bin/" diff --git a/test/aws/create_machineset.yml b/test/aws/create_machineset.yml index 406783d42fa..8d294748ad2 100644 --- a/test/aws/create_machineset.yml +++ b/test/aws/create_machineset.yml @@ -57,6 +57,9 @@ - "'items' in new_machine.results.results[0]" - "new_machine.results.results[0]['items'] | length > 0" - "'status' in new_machine.results.results[0]['items'][0]" + - "'providerStatus' in new_machine.results.results[0]['items'][0]['status']" + - "'instanceState' in new_machine.results.results[0]['items'][0]['status']['providerStatus']" + - "new_machine.results.results[0]['items'][0]['status']['providerStatus']['instanceState'] == 'running'" - name: add machine to the inventory add_host: diff --git a/test/aws/scaleup.yml b/test/aws/scaleup.yml index f17191b138a..f5aa29edd74 100644 --- a/test/aws/scaleup.yml +++ b/test/aws/scaleup.yml @@ -29,6 +29,14 @@ tasks: - wait_for_connection: {} - setup: {} + - name: Copy ops-mirror.pem + copy: + src: ../../inventory/dynamic/injected/ops-mirror.pem + dest: /var/lib/yum/ops-mirror.pem + owner: root + group: root + mode: 0644 + ignore_errors: true - import_playbook: ../../playbooks/openshift-node/scaleup.yml @@ -92,10 +100,20 @@ register: crictl_logs_output with_items: "{{ crictl_ps_output.stdout_lines }}" ignore_errors: true + - name: Get crio logs + command: journalctl --no-pager -u cri-o + register: crio_logs + ignore_errors: true + - name: Get kubelet logs + command: journalctl --no-pager -u kubelet + register: kubelet_logs + ignore_errors: tru - debug: var: crictl_logs_output - debug: - msg: "{{ bootkube_logs.stdout_lines }}" + msg: "{{ kubelet_logs.stdout_lines }}" + - debug: + msg: "{{ crio_logs.stdout_lines }}" - fail: msg: Node failed to become Ready