Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Not able to exec into job containers using "-c" option. #1798

Closed
sangee2004 opened this issue Jun 15, 2023 · 2 comments
Closed

Not able to exec into job containers using "-c" option. #1798

sangee2004 opened this issue Jun 15, 2023 · 2 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@sangee2004
Copy link
Contributor

acorn version v0.7.1+df5bf694

Steps to reproduce the problem:

Acornfile used to deploy app:

containers: web: {
	image: "nginx"
	ports: publish: "80/http"
	files: {
		"/usr/share/nginx/html/index.html": "<h1>My First Acorn2!!</h1>"
	}
        #dependsOn: ["create-job"]
}

jobs: "create-job": {
	image: "busybox"
	command: ["sleep", "1800s"]
	events: ["create","update"]
}
%acorn app mytestjob  
NAME        IMAGE          HEALTHY   UP-TO-DATE   CREATED   ENDPOINTS                                                      MESSAGE
mytestjob   136931d8e6a9   1         1            18m ago   https://web-mytestjob-f38b5f5d.yidyla.oss-acorn.io => web:80   [jobs: create-job: [running]]

%acorn containers mytestjob            
NAME                           APP         IMAGE     STATE     RESTARTCOUNT   CREATED   MESSAGE
mytestjob.web-cd4559ff-8wcmf   mytestjob   nginx     running   0              13m ago   
mytestjob.create-job-xcd87     mytestjob   busybox   running   0              13m ago   

We are not able to exec into job containers using "-c" option.

acorn exec -c create-job mytestjob
  ✗  ERROR:  failed to find any containers for app mytestjob

 % acorn exec -c web mytestjob
root@web:/# exit
exit
@sangee2004 sangee2004 added this to the v0.8.0 milestone Jun 15, 2023
@cjellick cjellick added the kind/bug Something isn't working label Jun 22, 2023
@iwilltry42 iwilltry42 self-assigned this Jul 11, 2023
@sangee2004
Copy link
Contributor Author

Tested with acorn version v0.8.0-alpha7-151-gc1b7f440+c1b7f440

Able to exec into job containers using "-c" option.

acorn container mytestjobs
NAME                              ACORN        IMAGE     STATE     RESTARTCOUNT   CREATED   MESSAGE
mytestjobs.create-job-ptp7l       mytestjobs   busybox   running   0              42s ago   
mytestjobs.web-6c7cc95987-4dwk6   mytestjobs   nginx     running   0              42s ago   

 % acorn exec -c create-job mytestjobs
/ # ls
bin    dev    etc    home   lib    lib64  proc   root   run    sys    tmp    usr    var
/ # exit

@sangee2004
Copy link
Contributor Author

Also able to exec into sidecar containers using "-c" option.

acorn containers mytestside 
NAME                                         ACORN        IMAGE     STATE     RESTARTCOUNT   CREATED   MESSAGE
mytestside.nginx1-7cfc94868b-mtl6g           mytestside   nginx     running   0              35s ago   
mytestside.nginx1-7cfc94868b-mtl6g:sidecar   mytestside   ubuntu    running   0              35s ago   

 % acorn exec -c sidecar mytestside 
root@nginx1:/# ls
bin  boot  dev  etc  home  lib  media  mnt  opt  proc  root  run  sbin  srv  sys  test123  tmp  usr  var
root@nginx1:/# exit

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants