Hide Forgot
Created attachment 1219300 [details] test-multihost.tar.gz Description of problem: Can not get ${SERVERS} value Version-Release number of selected component (if applicable): 0.1.28 How reproducible: yes Steps to Reproduce: 1.use following xml <job> <recipeSet> <recipe role="SERVERS"> <task name="ssh-sysrq-c"> <fetch url="http://10.66.12.120:8080/test-multihost.tar.gz#mul" /> </task> </recipe> <recipe> <task name="ssh-sysrq-c" role="CLIENTS"> <fetch url="http://10.66.12.120:8080/test-multihost.tar.gz#mul" /> </task> </recipe> </recipeSet> </job> 2.run restraint with this job Actual results: only print ${CLIENTS} not ${SERVER} Expected results: print ${CLIENTS} and ${SERVERS} Additional info: In env.c:164, I add a line whitch to use g_print to print all env.Here is output: JOB_MEMBERS=10.73.4.215 localhost TESTID=1 HARNESS_PREFIX=RSTRNT_ RSTRNT_RECIPE_URL=http://localhost:8081/recipes/1 RSTRNT_RECIPEID=1 RSTRNT_TASKID=1 RSTRNT_TASKNAME=ssh-sysrq-c RSTRNT_TASKPATH=/mnt/tests/10.66.12.120:8080/test-multihost.tar.gz/mul RSTRNT_MAXTIME=0 RSTRNT_REBOOTCOUNT=0 RSTRNT_TASKORDER=0 HOME=/root TERM=vt100 LANG=en_US.UTF-8 PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin CLIENTS=10.73.4.215 RECIPE_MEMBERS=10.73.4.215 localhost (null) (null) (null) (null) (null) Seems SERVERS not exist.
http://gerrit.beaker-project.org/5423
Seems this problem caused by using role in "TASK" label. In fact, this xml was modified from http://restraint.readthedocs.io/en/latest/jobs.html. So I think maybe we need modified this document.
(In reply to qhsong from comment #2) > Seems this problem caused by using role in "TASK" label. In fact, this xml > was modified from http://restraint.readthedocs.io/en/latest/jobs.html. It is more of using both roles in task and recipe tags. > So I think maybe we need modified this document. Don't think so, the document is there to demonstrate different applications of "role" argument. It wasn't intended to be used as an example xml. Anyway, after fix mentioned in comment#1 is applied it should work this way again.
Got it.Currently I put role in recipe, it works in beaker and restarintd. Waiting it to publish.