Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

retry on a step looses environment variables #64

Open
npf opened this issue Dec 22, 2015 · 2 comments
Open

retry on a step looses environment variables #64

npf opened this issue Dec 22, 2015 · 2 comments
Assignees
Labels

Comments

@npf
Copy link
Contributor

npf commented Dec 22, 2015

See the 3rd line : "[in] Runing puppet for variant ...",

Step 31 : setup/run_orchestrator/run_puppet
--> Running the step...
[in] Runing puppet for variant 'digitalis'
[in] /root/kameleon_workdir/kameleon_scripts/in/00295_echo_runing_puppet_for_variant.sh: line 25: exit: too many arguments
[in] Runing puppet for variant 'digitalis'
Starting process: "bash"
Starting process: "ssh -F /home/neyron/scm/digitalis/kameleon-g5k/build/idall-jessie-x64-std/ssh_config idall-jessie-x64-std -t /bin/bash"
Starting process: "ssh -F /home/neyron/scm/digitalis/kameleon-g5k/build/idall-jessie-x64-std/ssh_config idall-jessie-x64-std -t /bin/bash"
Error occured when executing the following command :

> exec_in: echo "Runing puppet for variant '$VARIANT'" && exit 1 /opt/puppetlabs/bin/puppet
>   apply -d --modulepath=/tmp/puppet_recipes/modules:/etc/puppetlabs/code/environments/production/modules
>   /tmp/puppet_recipes/manifests/$VARIANT.pp | tee /tmp/puppet_exec.log
Press [r] to retry
Press [c] to continue with execution
Press [a] to abort execution
Press [l] to switch to local_context shell
Press [o] to switch to out_context shell
Press [i] to switch to in_context shell
answer ? [c/a/r/l/o/i]:  r
User choice: [r] retry
Retrying the previous command...
[in] Runing puppet for variant ''
[in] /root/kameleon_workdir/kameleon_scripts/in/00297_echo_runing_puppet_for_variant.sh: line 25: exit: too many arguments
Starting process: "bash"
Starting process: "ssh -F /home/neyron/scm/digitalis/kameleon-g5k/build/idall-jessie-x64-std/ssh_config idall-jessie-x64-std -t /bin/bash"
Starting process: "ssh -F /home/neyron/scm/digitalis/kameleon-g5k/build/idall-jessie-x64-std/ssh_config idall-jessie-x64-std -t /bin/bash"
Error occured when executing the following command :

> exec_in: echo "Runing puppet for variant '$VARIANT'" && exit 1 /opt/puppetlabs/bin/puppet
>   apply -d --modulepath=/tmp/puppet_recipes/modules:/etc/puppetlabs/code/environments/production/modules
>   /tmp/puppet_recipes/manifests/$VARIANT.pp | tee /tmp/puppet_exec.log
Press [r] to retry
Press [c] to continue with execution
Press [a] to abort execution
Press [l] to switch to local_context shell
Press [o] to switch to out_context shell
Press [i] to switch to in_context shell
answer ? [c/a/r/l/o/i]:  

The corresponding step part is:

- run_puppet:
  - exec_in: |
      if [ -z "$$variant" ]; then
        VARIANT=std
      else
        VARIANT=$$variant
      fi
      echo "Runing puppet for variant '$VARIANT'"
  - exec_in:
      echo "Runing puppet for variant '$VARIANT'" && exit 1
      ...
@mickours
Copy link
Contributor

Same issue reported here:
oar-team/kameleon-recipes#14

Here is a minimal recipe test case:

setup:
  - reproduce_bug:
    - do_it:
      - exec_local: export TOTO=test
      - exec_local: |
          echo this is a $TOTO
          false

Run once, shows this is a test, retry and test is missing.

@npf
Copy link
Contributor Author

npf commented Mar 8, 2017

Same issue again: oar-team/kameleon-recipes#30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants