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

awk seemed not working in podman on MAC M1

Open caolan-ibm opened this issue 1 year ago • 0 comments

on my MAC M1 laptop, I got the following error inside podman after running podman run -it --rm --pull always -v ${PWD}:/scripts --name ibmmas quay.io/ibmmas/cli

  • podman version 5.0.3
TASK [ibm.mas_devops.suite_install : Lookup Certificate Manager installations] **********************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => changed=true
  cmd: oc get pods -A | grep cert-manager-cainjector | awk '{print $1}'
  delta: '0:00:04.191787'
  end: '2024-05-29 10:37:48.066131'
  msg: non-zero return code
  rc: 139
  start: '2024-05-29 10:37:43.874344'
  stderr: |-
    qemu-x86_64-static: QEMU internal SIGSEGV {code=MAPERR, addr=0x20}
    /bin/sh: line 1: 37776 Done                    oc get pods -A
         37778 Broken pipe             | grep cert-manager-cainjector
         37780 Segmentation fault      (core dumped) | awk '{print $1}'
  stderr_lines: <omitted>
  stdout: ''
  stdout_lines: <omitted>

NO MORE HOSTS LEFT **********************************************************************************************************************************************************************************************************************************

PLAY RECAP ******************************************************************************************************************************************************************************************************************************************
localhost                  : ok=263  changed=17   unreachable=0    failed=1    skipped=116  rescued=0    ignored=0

I tried the following manually inside the podman container:

[ibmmas/cli:9.1.0]scripts$ oc get pods -A | grep cert-manager-cainjector
cert-manager                                       cert-manager-cainjector-7dc6454b76-25fqt                            1/1     Running     0              21h
[ibmmas/cli:9.1.0]scripts$ oc get pods -A | grep cert-manager-cainjector | awk '{print $1}'
qemu-x86_64-static: QEMU internal SIGSEGV {code=MAPERR, addr=0x20}
Segmentation fault (core dumped)

Same shell command will work on Ubuntu inside docker container for the same OCP cluster:

[ibmmas/cli:9.1.0]mascli$  oc get pods -A | grep cert-manager-cainjector
cert-manager                                       cert-manager-cainjector-7dc6454b76-25fqt                            1/1     Running     0              21h
[ibmmas/cli:9.1.0]mascli$  oc get pods -A | grep cert-manager-cainjector | awk '{print $1}'
cert-manager
[ibmmas/cli:9.1.0]mascli$

caolan-ibm avatar May 29 '24 14:05 caolan-ibm