Bug 461479 - make submit doesn't exit on SNAKE error
Summary: make submit doesn't exit on SNAKE error
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nick Coghlan
QA Contact:
URL:
Whiteboard: MC
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-08 13:36 UTC by Alexander Todorov
Modified: 2012-11-07 07:24 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-11-07 07:24:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Alexander Todorov 2008-09-08 13:36:23 UTC
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):
rhts-devel-python-3.3-13
rhts-rh-devel-3.4-20080902.0
rhts-scheduler-workflows-3.4-20080902.0
rhts-legacy-3.4-20080902.0
rhts-devel-test-env-3.3-13
rhts-release-1-0
rhts-devel-3.3-13


How reproducible:
Always

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):

    ks=InstallKs()
    ks.packages.add(['@base'])

    script = '''
echo "test"
'''

    post = Script(script, type=KS_SCRIPT_POST, inChroot=False)
    ks.scripts.append(post)

    return ks

Comment 1 Bill Peck 2010-04-07 12:36:39 UTC
Notice:

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
product.


thank you

Comment 2 Alexander Todorov 2010-04-08 12:56:20 UTC
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 14:25:29 UTC
make submit still doesn't work

Version:
rhts-devel-4.41-1.fc14.noarch

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

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


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 22:34:08 UTC
$ 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 23:39:22 UTC
make submit is not used anymore.. use make bkradd

Comment 7 Alexander Todorov 2011-10-12 09:17:29 UTC
Hi Bill,
does bkradd check for errors returned from SNAKE server before proceeding ? See comment #0.

Comment 8 Bill Peck 2011-10-12 13:11:15 UTC
Yes it does..

From the Makefile..
SNAKESERVER ?= $(TESTSERVER)
snake-submit:
	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' ..."
            $SNAKEKS -s $SNAKE_SERVER add $TEMPLATE
            exit $?
        else
            echo "SNAKE template '$TEMPLATE' not found"
            echo -1
        fi

Comment 9 Nick Coghlan 2012-10-17 04:37:20 UTC
Bulk reassignment of issues as Bill has moved to another team.

Comment 10 Min Shin 2012-11-07 07:24:27 UTC
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.