Bug 1219971 - rhts-devel: "make rpm" --> tries add task to beaker system
Summary: rhts-devel: "make rpm" --> tries add task to beaker system
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 20
Hardware: Unspecified
OS: Unspecified
low
unspecified
Target Milestone: 20.2
Assignee: Dan Callaghan
QA Contact: tools-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-05-08 20:45 UTC by Andrei Stepanov
Modified: 2018-02-06 00:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-07-14 08:04:50 UTC
Embargoed:


Attachments (Terms of Use)

Description Andrei Stepanov 2015-05-08 20:45:58 UTC
First, answer for the question:
Is it fair to develop rhts test on live beaker system ?
If the answer is "Yes", then there is a bug.

Find any test or create a new one:

# beaker-wizard + hit enter a few times

# make rpm

Result: it tries to add task to beaker system.

Why???????????

It is kinda wierd to add task to beaker if $BEAKER var is defined.

# sed -n -e '168p' /usr/libexec/rhts/rhts-mk-build-package 
        bkr task-add $RPM || exit 1

# make rpm
rhts-mk-build-package
           CURRENT_TAG: 
                  NAME: tmp-CoreOS-tmp-Sanity-a-few-descriptive-words
               VERSION: 1.0
               RELEASE: 0
            SOURCE_DIR: /mnt/tests/tmp/Sanity/a-few-descriptive-words
               TMP_DIR: /tmp/rhts-build-9WXuEhkx
             BUILD_DIR: /tmp/rhts-build-9WXuEhkx/rpm-build
  GENERATED_SOURCE_DIR: /tmp/rhts-build-9WXuEhkx/build
           INSTALL_DIR: /tmp/rhts-build-9WXuEhkx/install
Creating tarball: /tmp/rhts-build-9WXuEhkx/build/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.tar.gz
./
./PURPOSE
./Makefile
./runtest.sh
Gathering testinfo.desc files:
           EXTRACT_DIR: /tmp/rhts-build-9WXuEhkx/extract-for-metadata
./
./PURPOSE
./Makefile
./runtest.sh
/tmp/rhts-build-9WXuEhkx/extract-for-metadata /mnt/tests/tmp/Sanity/a-few-descriptive-words
make[1]: Entering directory `/tmp/rhts-build-9WXuEhkx/extract-for-metadata'
/bin/sh: -c: line 0: syntax error near unexpected token `)'
/bin/sh: -c: line 0: `echo "RhtsRequires:	library(openssl/basic)"  >> testinfo.desc) # yum'
make[1]: *** [testinfo.desc] Error 1
make[1]: Leaving directory `/tmp/rhts-build-9WXuEhkx/extract-for-metadata'
make: *** [noarch-rpm] Error 2
[root@astepano2 a-few-descriptive-words]# vim /var/tmp/rpm-tmp.3liRWf
[root@astepano2 a-few-descriptive-words]# vim Makefile 
[root@astepano2 a-few-descriptive-words]# make rpm
rhts-mk-build-package
           CURRENT_TAG: 
                  NAME: tmp-CoreOS-tmp-Sanity-a-few-descriptive-words
               VERSION: 1.0
               RELEASE: 0
            SOURCE_DIR: /mnt/tests/tmp/Sanity/a-few-descriptive-words
               TMP_DIR: /tmp/rhts-build-CpZ3sJzJ
             BUILD_DIR: /tmp/rhts-build-CpZ3sJzJ/rpm-build
  GENERATED_SOURCE_DIR: /tmp/rhts-build-CpZ3sJzJ/build
           INSTALL_DIR: /tmp/rhts-build-CpZ3sJzJ/install
Creating tarball: /tmp/rhts-build-CpZ3sJzJ/build/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.tar.gz
./
./PURPOSE
./Makefile
./runtest.sh
Gathering testinfo.desc files:
           EXTRACT_DIR: /tmp/rhts-build-CpZ3sJzJ/extract-for-metadata
./
./PURPOSE
./Makefile
./runtest.sh
/tmp/rhts-build-CpZ3sJzJ/extract-for-metadata /mnt/tests/tmp/Sanity/a-few-descriptive-words
make[1]: Entering directory `/tmp/rhts-build-CpZ3sJzJ/extract-for-metadata'
rhts-lint testinfo.desc
make[1]: Leaving directory `/tmp/rhts-build-CpZ3sJzJ/extract-for-metadata'
/mnt/tests/tmp/Sanity/a-few-descriptive-words
Generating specfile: /tmp/rhts-build-CpZ3sJzJ/build/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.spec
Building package:
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.IDpIM5
+ umask 022
+ cd /tmp/rhts-build-CpZ3sJzJ/rpm-build
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /tmp/rhts-build-CpZ3sJzJ/rpm-build
+ rm -rf tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0
+ /bin/mkdir -p tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0
+ cd tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0
+ /usr/bin/gzip -dc /tmp/rhts-build-CpZ3sJzJ/build/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.tar.gz
+ /bin/tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.EVla9t
+ umask 022
+ cd /tmp/rhts-build-CpZ3sJzJ/rpm-build
+ cd tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ '[' /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64 '!=' / ']'
+ '[' -d /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64 ']'
+ mkdir -p /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64/mnt/tests
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.OZD7vS
+ umask 022
+ cd /tmp/rhts-build-CpZ3sJzJ/rpm-build
+ '[' /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64 '!=' / ']'
+ rm -rf /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64
++ dirname /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64
+ mkdir -p /root/rpmbuild/BUILDROOT
+ mkdir /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64
+ cd tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ mkdir -p /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64/mnt/tests
+ make DEST=/root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64 install
make[1]: Entering directory `/tmp/rhts-build-CpZ3sJzJ/rpm-build/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0'
rhts-lint testinfo.desc
mkdir -p /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64/mnt/tests/CoreOS/tmp/Sanity/a-few-descriptive-words
cp -a testinfo.desc runtest.sh Makefile PURPOSE Makefile /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64/mnt/tests/CoreOS/tmp/Sanity/a-few-descriptive-words
cp: warning: source file `Makefile' specified more than once
if [ -e "runtest.sh" ]; then install -m 0755 runtest.sh /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64/mnt/tests/CoreOS/tmp/Sanity/a-few-descriptive-words; fi
rm testinfo.desc
make[1]: Leaving directory `/tmp/rhts-build-CpZ3sJzJ/rpm-build/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0'
+ chmod -R a-s /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64
+ /usr/lib/rpm/brp-compress
Processing files: tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.noarch
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64
Wrote: /tmp/rhts-build-CpZ3sJzJ/install/noarch/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.noarch.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.kaGHQF
+ umask 022
+ cd /tmp/rhts-build-CpZ3sJzJ/rpm-build
+ cd tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0
+ '[' /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64 '!=' / ']'
+ '[' -d /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64 ']'
+ rm -rf /root/rpmbuild/BUILDROOT/tmp-CoreOS-tmp-Sanity-a-few-descriptive-words-1.0-0.x86_64
+ exit 0
/tmp/rhts-build-CpZ3sJzJ/install /mnt/tests/tmp/Sanity/a-few-descriptive-words
XML-RPC connection to localhost failed: Connection refused, 5 retries left
XML-RPC connection to localhost failed: Connection refused, 4 retries left
XML-RPC connection to localhost failed: Connection refused, 3 retries left
XML-RPC connection to localhost failed: Connection refused, 2 retries left
XML-RPC connection to localhost failed: Connection refused, 1 retry left
Traceback (most recent call last):
  File "/usr/bin/bkr", line 9, in <module>
    load_entry_point('bkr.client==20.1', 'console_scripts', 'bkr')()
  File "/usr/lib/python2.6/site-packages/bkr/client/main.py", line 64, in main
    return cmd.run(*cmd_args, **cmd_opts.__dict__)
  File "/usr/lib/python2.6/site-packages/bkr/client/commands/cmd_task_add.py", line 73, in run
    self.set_hub(**kwargs)
  File "/usr/lib/python2.6/site-packages/bkr/client/__init__.py", line 71, in set_hub
    proxy_user=proxy_user)
  File "/usr/lib/python2.6/site-packages/bkr/client/command.py", line 279, in set_hub
    self.hub = HubProxy(conf=self.conf, auto_login=auto_login)
  File "/usr/lib/python2.6/site-packages/bkr/common/hub.py", line 62, in __init__
    self._login()
  File "/usr/lib/python2.6/site-packages/bkr/common/hub.py", line 89, in _login
    if force or self._hub.auth.renew_session():
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.6/site-packages/bkr/common/xmlrpc.py", line 560, in request
    result = transport_class.request(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bkr/common/xmlrpc.py", line 394, in _request
    self.send_content(h, request_body)
  File "/usr/lib64/python2.6/xmlrpclib.py", line 1349, in send_content
    connection.endheaders()
  File "/usr/lib64/python2.6/httplib.py", line 908, in endheaders
    self._send_output()
  File "/usr/lib64/python2.6/httplib.py", line 780, in _send_output
    self.send(msg)
  File "/usr/lib64/python2.6/httplib.py", line 739, in send
    self.connect()
  File "/usr/lib/python2.6/site-packages/bkr/common/xmlrpc.py", line 143, in connect
    httplib.HTTPSConnection.connect(self)
  File "/usr/lib64/python2.6/httplib.py", line 1112, in connect
    sock = socket.create_connection((self.host, self.port), self.timeout)
  File "/usr/lib64/python2.6/socket.py", line 567, in create_connection
    raise error, msg
socket.error: [Errno 111] Connection refused
make: *** [noarch-rpm] Error 1

Comment 1 Dan Callaghan 2015-06-09 00:43:41 UTC
rhts-mk-build-package uses a shell variable ${BEAKER} which happens to collide with the same-named env var set in the Beaker-provisioned environment. We can fix the script easily enough.

Workaround is to unset BEAKER in your environment before invoking make rpm.

Comment 2 Dan Callaghan 2015-06-09 00:50:03 UTC
http://gerrit.beaker-project.org/4239

Comment 3 Dan Callaghan 2015-06-11 01:59:49 UTC
This bug fix is included in rhts-devel 4.66 which is available for testing here:

https://beaker-project.org/yum/client-testing/

Comment 5 Dan Callaghan 2015-07-14 08:04:50 UTC
Beaker 20.2 has been released.


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