tinkerbell / actions

Suite of Tinkerbell Actions for use in Tinkerbell Workflows
Apache License 2.0
27 stars 42 forks source link

unable to install cryptsetup in tinkerbell action #106

Closed ygao-armada closed 6 months ago

ygao-armada commented 7 months ago

I try to use cexec to install cryptsetup as follows:

- environment:
     BLOCK_DEVICE: /dev/sda2
     CHROOT: "y"
     CMD_LINE: apt -y update && apt -y install openssl cryptsetup
     DEFAULT_INTERPRETER: /bin/sh -c
     FS_TYPE: ext4
    image: public.ecr.aws/eks-anywhere/tinkerbell/hub/cexec:6c0f0d437bde2c836d90b000312c8b25fa1b65e1-eks-a-41
    name: install-openssl-crypt
    timeout: 90

However, I get this error in boots log (openssl is fine):

{"level":"info","ts":1708196321.6035774,"caller":"syslog/receiver.go:113","msg":"host=10.20.22.211 facility=daemon severity=INFO app-name=6ab16e7894a1 procid=2998 msg=\"\\x1b[1;31mE: \\x1b[0mUnable to locate package cryptsetup\\x1b[0m\\n\"","service":"github.com/tinkerbell/boots","pkg":"syslog"}
{"level":"info","ts":1708196321.6040635,"caller":"syslog/receiver.go:113","msg":"host=10.20.22.211 facility=daemon severity=INFO app-name=5e73ff8c10e3 procid=2998 msg=\"\\x1b[31mFATA\\x1b[0m[0000] Error running [/bin/sh [-c apt -y update && apt -y install openssl cryptsetup]] [exit status 100] \\r\\n\"","service":"github.com/tinkerbell/boots","pkg":"syslog"}

Expected Behaviour

I expect cryptsetup will be installed successfully

Current Behaviour

The tinkerbell workflow failed due to the error mentioned above

Possible Solution

Steps to Reproduce (for bugs)

1. 2. 3. 4.

Context

Your Environment

ygao-armada commented 7 months ago

Someone suggests to use package name "cryptsetup-bin", it leads to similar error:

{"level":"info","ts":1708202070.948568,"caller":"syslog/receiver.go:113","msg":"host=10.20.22.211 facility=daemon severity=INFO app-name=1253e250a7d0 procid=3015 msg=\"\\x1b[1;31mE: \\x1b[0mUnable to locate package cryptsetup-bin\\x1b[0m\\n\"","service":"github.com/tinkerbell/boots","pkg":"syslog"}
{"level":"info","ts":1708202070.9490566,"caller":"syslog/receiver.go:113","msg":"host=10.20.22.211 facility=daemon severity=INFO app-name=9b084a634c10 procid=3015 msg=\"\\x1b[31mFATA\\x1b[0m[0000] Error running [/bin/sh [-c apt -y update && apt -y install openssl cryptsetup-bin]] [exit status 100] \\r\\n\"","service":"github.com/tinkerbell/boots","pkg":"syslog"}
chrisdoherty4 commented 6 months ago

Hi @ygao-armada. Thanks for checking in. This doesn't seem like a Tinkerbell issue. If you can provide more details to the contrary we'd be happy to re-open and look further.