an error should lead to a non-zero exit code if called with -a #40

Closed
opened 2021-10-19 22:13:25 +02:00 by c33s · 0 comments
c33s commented 2021-10-19 22:13:25 +02:00 (Migrated from github.com)

i use install image via terraform with the -a flag to provision my images with the following command

/root/.oldroot/nfs/install/installimage -a -n myname -b grub -r no -i /root/.oldroot/nfs/images/`ls /root/.oldroot/nfs/images | grep -E '^Debian.*bullseye.*minimal.tar.gz$' | sort | tail -n1` ... -t yes

as you, sadly, have new naming conventions for your images, the script had an error, as i called it via terraform, the script got stuck so hard that i had to kill the terraform process, even a ctrl-x or ctrl-c have not helped.

terraform was stuck at:
image

i had to add a logoutput to my terraform which outputs the exactly command and run it manually on the system to finally see:

image

which i debugged to your new file naming scheme.

running installimage with -a (or maybe a new flag like --no-interaction or --batch) should never lead to a gui showing the error but to a non-zero exit code an an error message to std-err.

would be really helpful and safe time.

it would be really nice if you could add a symlink following the previous naming scheme. in general a more stable naming scheme would be awesome.

   0 lrwxrwxrwx  1 root root    50 Aug 25 08:28 Debian-913-stretch-64-minimal.tar.gz -> ../images.old/Debian-913-stretch-64-minimal.tar.gz
   0 lrwxrwxrwx  1 root root    36 Aug 24 13:16 Debian-oldstable-64-minimal.tar.gz -> Debian-1010-buster-64-minimal.tar.gz
   0 lrwxrwxrwx  1 root root    36 Jul 20 08:02 Debian-stable-64-minimal.tar.gz -> Debian-1010-buster-64-minimal.tar.gz
   0 lrwxrwxrwx  1 root root    38 Aug 24 13:18 Debian-stable-amd64-base.tar.gz -> Debian-1100-bullseye-amd64-base.tar.gz

debian buster should not be called debian stable any more.

something like the following would be really helpful

Debian-latest -> Debian-bullseye-1101 
Debian-buster-latest -> Debian-buster-1011
Debian-buster-1000
Debian-buster-1001
...
Debian-buster-1011
Debian-bullseye-latest -> Debian-bullseye-1101
Debian-bullseye-1101 
Debian-bullseye-1100
i use install image via terraform with the `-a` flag to provision my images with the following command ``` /root/.oldroot/nfs/install/installimage -a -n myname -b grub -r no -i /root/.oldroot/nfs/images/`ls /root/.oldroot/nfs/images | grep -E '^Debian.*bullseye.*minimal.tar.gz$' | sort | tail -n1` ... -t yes ``` as you, sadly, have new naming conventions for your images, the script had an error, as i called it via terraform, the script got stuck so hard that i had to kill the terraform process, even a `ctrl-x` or `ctrl-c` have not helped. terraform was stuck at: ![image](https://user-images.githubusercontent.com/649209/137981571-f87d79ed-dc66-40c2-869c-6da1007d09a6.png) i had to add a logoutput to my terraform which outputs the exactly command and run it manually on the system to finally see: ![image](https://user-images.githubusercontent.com/649209/137982291-e322fcc6-ff35-415e-a3ed-204fa13cc4a1.png) which i debugged to your new file naming scheme. running installimage with `-a` (or maybe a new flag like --no-interaction or --batch) should never lead to a gui showing the error but to a non-zero exit code an an error message to std-err. would be really helpful and safe time. it would be really nice if you could add a symlink following the previous naming scheme. in general a more stable naming scheme would be awesome. ``` 0 lrwxrwxrwx 1 root root 50 Aug 25 08:28 Debian-913-stretch-64-minimal.tar.gz -> ../images.old/Debian-913-stretch-64-minimal.tar.gz 0 lrwxrwxrwx 1 root root 36 Aug 24 13:16 Debian-oldstable-64-minimal.tar.gz -> Debian-1010-buster-64-minimal.tar.gz 0 lrwxrwxrwx 1 root root 36 Jul 20 08:02 Debian-stable-64-minimal.tar.gz -> Debian-1010-buster-64-minimal.tar.gz 0 lrwxrwxrwx 1 root root 38 Aug 24 13:18 Debian-stable-amd64-base.tar.gz -> Debian-1100-bullseye-amd64-base.tar.gz ``` debian buster should not be called debian stable any more. something like the following would be really helpful ``` Debian-latest -> Debian-bullseye-1101 Debian-buster-latest -> Debian-buster-1011 Debian-buster-1000 Debian-buster-1001 ... Debian-buster-1011 Debian-bullseye-latest -> Debian-bullseye-1101 Debian-bullseye-1101 Debian-bullseye-1100 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DiamantTh/installimage#40
No description provided.