Hide Forgot
Description of problem: I submitted job using below way, but task "/CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs" disappeared in beaker: # bkr workflow-simple --arch=x86_64 --distro=RHEL6.1-20110224.2 --variant=server --whiteboard="/CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs" --task=/CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs --prettyxml --debug <job> <whiteboard> /CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs </whiteboard> <recipeSet priority="Normal" retention_tag="Scratch"> <recipe ks_meta="method=nfs" whiteboard="/CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs"> <distroRequires> <and> <distro_name op="=" value="RHEL6.1-20110224.2"/> <distro_variant op="=" value="server"/> <distro_arch op="=" value="x86_64"/> </and> </distroRequires> <hostRequires> <and/> </hostRequires> <repos/> <task name="/distribution/install" role="STANDALONE"> <params/> </task> <task name="/CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs" role="STANDALONE"> <params/> </task> </recipe> </recipeSet> </job> Submitted: ['j:59413'] The task "/CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs" shown correct in command line, but disappeared in xml by checking web ui: https://beaker.engineering.redhat.com/jobs/clone?job_id=59413 How reproducible: always Actual results: /CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs task lost, just do distribution install. Expected results: /CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs task should be done in beaker.
RedHatEnterpriseLinux6 is an excluded arch for that task. Possibly the real error here is that it's showing no error...
Did I say arch? I meant Distro...
(In reply to comment #2) > Did I say arch? I meant Distro... thanks, I've got it. So could it have any enhancement for it? e.g. get hint feedback from command line?
Dan, How come ignore_missing tasks doesn't catch this?
(In reply to comment #4) > How come ignore_missing tasks doesn't catch this? You're thinking of the --ignore-missing-tasks option to bkr job-submit (bug 601174), which allows users to submit a job containing tasks which don't exist (normally this is an error). But this bug is about a task which is excluded from RHEL6 so Beaker is silently dropping it from the job, as it has always done. We could make this bug an RFE to provide a warning for the excluded task, but that's not totally straightforward. For errors in job submission we return an XML-RPC fault, but right now we don't have any facility for returning warnings along with a successful job submission.
(In reply to comment #5) > right now we don't have any facility for returning warnings > along with a successful job submission. What I really meant to say here is that we don't have any nice way of propagating warnings from deep inside _handleRecipe out to the caller to be returned to the user.
Created attachment 489324 [details] pynfs log on i386
(In reply to comment #7) > Created attachment 489324 [details] > pynfs log on i386 pls ignore above attachment, wrong upload.
With Bill's fix for bug 683913, this situation is now slightly improved: instead of submitting the job and the server silently discarding the excluded task, the client now prints a somewhat confusing error and bails out without submitting the job. You must specify a package, type or task to run Maybe we can make the client print a warning for each task that is being discarded because of exclusions. Then the error here should be clearer.
How about this? diff --git a/Client/src/bkr/client/__init__.py b/Client/src/bkr/client/__init__.py index fef0b18..8e11b68 100644 --- a/Client/src/bkr/client/__init__.py +++ b/Client/src/bkr/client/__init__.py @@ -263,6 +263,10 @@ def getTasks(self, *args, **kwargs): if kwargs.get("task", None): tasks = self.hub.tasks.filter(dict(names=kwargs.get('task'), osmajor=filter['osmajor'])) + for dropped_task in set(kwargs['task']).difference( + set(task['name'] for task in tasks)): + print >>sys.stderr, 'WARNING: task %s not applicable ' \ + 'for distro, ignoring' % dropped_task if self.n_clients or self.n_servers: self.multi_host = True It produces output like this: WARNING: task /CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs not applicable for distro, ignoring You must specify a package, type or task to run
(In reply to comment #10) > How about this? > > diff --git a/Client/src/bkr/client/__init__.py > b/Client/src/bkr/client/__init__.py > index fef0b18..8e11b68 100644 > --- a/Client/src/bkr/client/__init__.py > +++ b/Client/src/bkr/client/__init__.py > @@ -263,6 +263,10 @@ def getTasks(self, *args, **kwargs): > if kwargs.get("task", None): > tasks = self.hub.tasks.filter(dict(names=kwargs.get('task'), > osmajor=filter['osmajor'])) > + for dropped_task in set(kwargs['task']).difference( > + set(task['name'] for task in tasks)): > + print >>sys.stderr, 'WARNING: task %s not applicable ' \ > + 'for distro, ignoring' % dropped_task > > if self.n_clients or self.n_servers: > self.multi_host = True > > It produces output like this: > > WARNING: task /CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs not > applicable for distro, ignoring > You must specify a package, type or task to run I think it's ok for me.
hi, seems I can't get the warning and the job submitted. Is there anything I miss? # bkr workflow-simple --arch=x86_64 --distro=RHEL6.1-20110413.1 --variant=server --whiteboard="/CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs" --task=/CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs --prettyxml --debug <job retention_tag="Scratch"> <whiteboard> /CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs </whiteboard> <recipeSet priority="Normal"> <recipe ks_meta="method=nfs" whiteboard="/CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs"> <distroRequires> <and> <distro_name op="=" value="RHEL6.1-20110413.1"/> <distro_variant op="=" value="server"/> <distro_method op="=" value="nfs"/> <distro_arch op="=" value="x86_64"/> </and> </distroRequires> <hostRequires> <and/> </hostRequires> <repos/> <task name="/distribution/install" role="STANDALONE"> <params/> </task> <task name="/CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs" role="STANDALONE"> <params/> </task> </recipe> </recipeSet> </job> Submitted: ['j:2479'] # cat ~/.beaker_client/config #HUB_URL = "https://beaker.engineering.redhat.com" HUB_URL="https://beaker-stage.app.eng.bos.redhat.com" AUTH_METHOD = "krbv" KRB_REALM = "REDHAT.COM" # rpm -qa|grep beaker beaker-0.6.7-2.el6.noarch beaker-redhat-0.1.30-1.el6.noarch beakerlib-redhat-1-2.el6.noarch beaker-client-0.6.7-2.el6.noarch beakerlib-1.3-3.el6.noarch python-beaker-1.3.1-6.fc12.noarch
(In reply to comment #13) > hi, > seems I can't get the warning and the job submitted. Is there anything I miss? Yes, there is: you need to use updated beaker client from beaker-stage and schedule your job against beaker-stage.
And the culprit is beaker-stage repo, which does not contain the RPMs you need. Try the beaker-client from: https://brewweb.devel.redhat.com/buildinfo?buildID=162757
The repo on stage was updated to contain the development beaker-client build.
verified it work now as expect: # bkr workflow-simple --arch=x86_64 --distro=RHEL6.1-20110413.1 --variant=server --whiteboard="/CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs" --task=/CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs --prettyxml --debug WARNING: task /CoreOS/samba/Security/CVE-2009-2948-suid-mount-cifs not applicable for distro, ignoring You must specify a package, type or task to run