Bug 461479 - make submit doesn't exit on SNAKE error
make submit doesn't exit on SNAKE error
Product: Beaker
Classification: Community
Component: command line (Show other bugs)
All Linux
medium Severity medium (vote)
: ---
: ---
Assigned To: Nick Coghlan
Depends On:
  Show dependency treegraph
Reported: 2008-09-08 09:36 EDT by Alexander Todorov
Modified: 2012-11-07 02:24 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-11-07 02:24:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Alexander Todorov 2008-09-08 09:36:23 EDT
Description of problem:
make submit will not exit if there's an error when submitting s test which contains faulty SNAKE template.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Create a new test
2. Add a SNAKE template which is not correct Python syntax
3. make SNAKESERVER=snake.test.redhat.com TESTSERVER=rhts.redhat.com submit

Actual results:
rhts-mk-snake-template -s snake.test.redhat.com
Kickstart template 'gui-mode.py' specified
Uploading SNAKE template 'gui-mode.py' to 'snake.test.redhat.com' ...
Added : 
... rpm package is build, etc ...

Expected results:
exit after Added:

Additional info:
the line "Added : " indicates a SNAKE error (which is not sent to the client though). The template below reproduces the error. The commented import line will cause "Script" to be undefined.

from pykickstart.version import RHEL5
from installdefaults import InstallKs
from pykickstart.constants import *
#from pykickstart.parser import Script

# minimal install, procedural style
def ks(**context):


    script = '''
echo "test"

    post = Script(script, type=KS_SCRIPT_POST, inChroot=False)

    return ks
Comment 1 Bill Peck 2010-04-07 08:36:39 EDT

Legacy RHTS is soon to be retired and replaced by Beaker. As part of
this migration process all RHTS bugs need to be re-verified against a
Beaker instance by the cut-off date

   5pm Monday April 12th UTC-4. 

Please confirm this bug is still relevant to Beaker by re-verifying it
against the stage deployment of Beaker https://beaker-stage.app.eng.bos.redhat.com.

To keep this bug open please comment on it

If it has not received a comment by that date the bug will be closed/wontfix.

After the cutoff date all commented bugs will be moved to the Beaker

thank you
Comment 2 Alexander Todorov 2010-04-08 08:56:20 EDT
Hi Bill,
are we going to have a `make submit' which will:

1) submit snake template to snake.devel if we have such
2) make package
3) bkr task-add *.rpm

If we do and it's based on the legacy make submit then it is still open.
Comment 3 Richard Marko 2011-10-10 10:25:29 EDT
make submit still doesn't work

Comment 4 Bill Peck 2011-10-11 13:39:08 EDT
submit: $(METADATA) snake-submit
	rhts-mk-build-package -s $(TESTSERVER)

bkradd: $(METADATA) snake-submit
	rhts-mk-build-package -b

What exactly doesn't work?  We have snake-submit as a dependency off both the legacy submit and the new bkradd.

I will be removing submit in an upcoming release.
Comment 5 Richard Marko 2011-10-11 18:34:08 EDT
$ make submit
rhts-mk-snake-template -s rhts.redhat.com
No SNAKE template specified, ignoring
rhts-mk-build-package -s rhts.redhat.com
           CURRENT_TAG: rh-tests-abrt-Sanity-testsuite-1_0-2
                  NAME: rh-tests-abrt-Sanity-testsuite
               VERSION: 1.0
               RELEASE: 2
            SOURCE_DIR: /work/tests/abrt/Sanity/testsuite
               TMP_DIR: /mnt/testarea/rhts-build-qpFz4VGS
             BUILD_DIR: /mnt/testarea/rhts-build-qpFz4VGS/rpm-build
  GENERATED_SOURCE_DIR: /mnt/testarea/rhts-build-qpFz4VGS/build
           INSTALL_DIR: /mnt/testarea/rhts-build-qpFz4VGS/install
Creating tarball: ...
...  (builds the package) ...
Error: Unable to connect to server rhts.redhat.com
make: *** [submit] Error 1
Comment 6 Bill Peck 2011-10-11 19:39:22 EDT
make submit is not used anymore.. use make bkradd
Comment 7 Alexander Todorov 2011-10-12 05:17:29 EDT
Hi Bill,
does bkradd check for errors returned from SNAKE server before proceeding ? See comment #0.
Comment 8 Bill Peck 2011-10-12 09:11:15 EDT
Yes it does..

From the Makefile..
	rhts-mk-snake-template -s $(SNAKESERVER)

From rhts-mk-snake-template
        # Does the provided $TEMPLATE file exist?
        if [ -f "$TEMPLATE" ]; then
            echo "Uploading SNAKE template '$TEMPLATE' to '$SNAKE_SERVER' ..."
            exit $?
            echo "SNAKE template '$TEMPLATE' not found"
            echo -1
Comment 9 Nick Coghlan 2012-10-17 00:37:20 EDT
Bulk reassignment of issues as Bill has moved to another team.
Comment 10 Min Shin 2012-11-07 02:24:27 EST
This bugs is closed as it is either not in the current Beaker scope or we could not find sufficient data in the bug report for consideration.
Please feel free to reopen the bug with additional information and/or business cases behind it.

Note You need to log in before you can comment on or make changes to this bug.