Skip to content

kgoss uses a chmod call not supported by busybox #868

Closed

Description

@erkules

Describe the bug
kgoss will not run with Containers using busybox

chmod: unrecognized option: recursive
BusyBox v1.36.1 (2023-07-27 17:12:24 UTC) multi-call binary.

Usage: chmod [-Rcvf] MODE[,MODE]... FILE...

MODE is octal number (bit pattern sstrwxrwxrwx) or [ugoa]{+|-|=}[rwxXst]

        -R      Recurse
        -c      List changed files
        -v      Verbose
        -f      Hide errors
command terminated with exit code 1

Expected Behavior

cat >goss.yaml <<EOF
port:
tcp:80:
listening: true
EOF

$ kgoss run  -i nginx:alpine
[INFO]: Parsing command line
[INFO]: using image: nginx:alpine
[INFO]: going to execute (may be blank): -- 
[INFO]: Preparing files to copy into container
[INFO]: Creating Kubernetes pod/container to test
++ /usr/local/bin/kubectl run kgoss-tester-6558 --image-pull-policy=Always --restart=Never --labels=app=kgoss-test '--output=jsonpath={.metadata.name}' --image=nginx:alpine --
+ id=kgoss-tester-6558
+ set +x
[INFO]: Waiting for container to be ready
pod/kgoss-tester-6558 condition met
[INFO]: Copying goss files into pod/container
[INFO]: Marking copied files as executable
[INFO]: Using pod/container: kgoss-tester-6558
[INFO]: Running tests within pod/container
Port: tcp:80: listening: matches expectation: true


Total Duration: 0.000s
Count: 1, Failed: 0, Skipped: 0
[INFO]: Deleting pod/container

Actual Behavior

$ kgoss run  -i nginx:alpine
[INFO]: Parsing command line
[INFO]: using image: nginx:alpine
[INFO]: going to execute (may be blank): -- 
[INFO]: Preparing files to copy into container
[INFO]: Creating Kubernetes pod/container to test
++ /usr/local/bin/kubectl run kgoss-tester-13743 --image-pull-policy=Always --restart=Never --labels=app=kgoss-test '--output=jsonpath={.metadata.name}' --image=nginx:alpine --
+ id=kgoss-tester-13743
+ set +x
[INFO]: Waiting for container to be ready
pod/kgoss-tester-13743 condition met
[INFO]: Copying goss files into pod/container
[INFO]: Marking copied files as executable
chmod: unrecognized option: recursive
BusyBox v1.36.1 (2023-11-06 11:32:24 UTC) multi-call binary.

Usage: chmod [-Rcvf] MODE[,MODE]... FILE...

MODE is octal number (bit pattern sstrwxrwxrwx) or [ugoa]{+|-|=}[rwxXst]

        -R      Recurse
        -c      List changed files
        -v      Verbose
        -f      Hide errors
command terminated with exit code 1

Activity

  1. erkules commented on Jan 25, 2024

    @erkules
    ContributorAuthor

    wow that was fast. thx a lot \o/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址