Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

installation of files in CI can fail #1

Open
pstrinkle opened this issue Mar 5, 2019 · 5 comments
Open

installation of files in CI can fail #1

pstrinkle opened this issue Mar 5, 2019 · 5 comments
Assignees

Comments

@pstrinkle
Copy link
Member

https://gerrit.openbmc-project.xyz/18327 is failing:

07:17:43 /home/jenkins-op/workspace/openbmc-repository-ci/openbmc/openpower-debug-collector

make -j 80 -l 80 -O
07:17:43 cp: cannot create regular file
'/usr/local/share/phosphor-dbus-yaml/yaml/org/open_power/Host/Boot.errors.yaml':
Permission denied
07:17:43 Makefile:1067: recipe for target
'phosphor-logging/elog-errors.hpp' failed
07:17:43 make: *** [phosphor-logging/elog-errors.hpp] Error 1
07:17:43 make: *** Waiting for unfinished jobs....
07:17:43 /usr/local/bin/sdbus++ -r . error exception-cpp
org.open_power.Host.Boot> org/open_power/Host/Boot/error.cpp
07:17:43 /usr/local/bin/sdbus++ -r . error exception-header
org.open_power.Host.Boot> org/open_power/Host/Boot/error.hpp
07:17:43 Traceback (most recent call last):
07:17:43 File
"/home/jenkins-op/workspace/openbmc-repository-ci/openbmc/unit-test.py",
line 796, in
07:17:43 build_and_install(UNIT_TEST_PKG, True)
07:17:43 File
"/home/jenkins-op/workspace/openbmc-repository-ci/openbmc/unit-test.py",
line 447, in build_and_install
07:17:43 check_call_cmd(*make_parallel)
07:17:43 File
"/home/jenkins-op/workspace/openbmc-repository-ci/openbmc/unit-test.py",
line 229, in check_call_cmd
07:17:43 check_call(cmd)
07:17:43 File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
07:17:43 raise CalledProcessError(retcode, cmd)
07:17:43 subprocess.CalledProcessError: Command '('make', '-j', '80',
'-l', '80', '-O')' returned non-zero exit status 2
07:17:43 Traceback (most recent call last):
07:17:43 File
"/home/jenkins-op/workspace/openbmc-repository-ci/openbmc/dbus-unit-test.py",
line 91, in
07:17:43 check_call(UNIT_TEST.split(','), env=os.environ)
07:17:43 File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
07:17:43 raise CalledProcessError(retcode, cmd)
07:17:43 subprocess.CalledProcessError: Command
'['/home/jenkins-op/workspace/openbmc-repository-ci/openbmc/unit-test.py',
'-w', '/home/jenkins-op/workspace/openbmc-repository-ci/openbmc',
'-p', 'openpower-debug-collector', '-b', 'master', '-v']' returned
non-zero exit status 1
07:17:44 Build step 'Execute shell' marked build as failure
07:17:44 Set build name.
07:17:44 New build name is '#25702-Patrick Venture'
07:17:47 Finished: FAILURE

@geissonator
Copy link

I started up our docker container and verified the files (and in general the filesystem is all root permission)

jenkins-op@temp:/$ ls -al /usr/local/share/phosphor-dbus-yaml/yaml/org/open_power/
total 44
drwxr-xr-x 23 root root 4096 Mar  4 22:42 .
drwxr-xr-x  5 root root 4096 Mar  4 22:42 ..
drwxr-xr-x  2 root root 4096 Mar  4 22:42 Common
drwxr-xr-x  2 root root 4096 Mar  4 22:42 Control
drwxr-xr-x  2 root root 4096 Mar  4 22:42 Host
-rw-r--r--  1 root root  152 Mar  4 22:42 Host.errors.yaml
-rw-r--r--  1 root root  287 Mar  4 22:42 Host.metadata.yaml
drwxr-xr-x  5 root root 4096 Mar  4 22:42 Inventory
drwxr-xr-x  2 root root 4096 Mar  4 22:42 OCC
drwxr-xr-x  2 root root 4096 Mar  4 22:42 Proc
drwxr-xr-x  5 root root 4096 Mar  4 22:42 Sensor

jenkins-op@temp:/$ touch /usr/local/share/phosphor-dbus-yaml/yaml/org/open_power/test
touch: cannot touch '/usr/local/share/phosphor-dbus-yaml/yaml/org/open_power/test': Permission denied


I'm not quite sure how this would ever work since we run as the local user. What am I missing @msbarth @wak-google ? How is the local user supposed to be able to install files out in /usr/local/ ?

@geissonator
Copy link

Looks like the issue is that https://github.com/openbmc/openpower-debug-collector/blob/master/Makefile.am is installing the generated yaml files to /usr/local/share during the make step, which is not run with sudo. Only the make install uses sudo.

@geissonator geissonator transferred this issue from openbmc/openbmc-build-scripts Apr 9, 2019
@geissonator
Copy link

The file installation of the generated yaml files should only happen during the "make install" step.

@lkammath
Copy link

checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
configure: WARNING: unrecognized options: --with-libtool-sysroot, --enable-examples, --enable-tests, --enable-code-coverage, --enable-valgrind
-bash-4.2$ make^C
-bash-4.2$ make clean
test -z "org/open_power/Host/Boot/error.cpp org/open_power/Host/Boot/error.hpp phosphor-logging/elog-errors.hpp" || rm -f org/open_power/Host/Boot/error.cpp org/open_power/Host/Boot/error.hpp phosphor-logging/elog-errors.hpp
rm -rf .libs _libs
rm -f checkstop_app watchdog_timeout
rm -f .o
rm -f org/open_power/Host/Boot/
.o
rm -f *.lo
-bash-4.2$ make
/esw/san5/othayoth/sdk-0129/sysroots/x86_64-oesdk-linux/usr/bin/sdbus++ -r . error exception-cpp org.open_power.Host.Boot> org/open_power/Host/Boot/error.cpp
/esw/san5/othayoth/sdk-0129/sysroots/x86_64-oesdk-linux/usr/bin/sdbus++ -r . error exception-header org.open_power.Host.Boot> org/open_power/Host/Boot/error.hpp
mkdir: cannot create directory ‘/esw/san5/othayoth/sdk-0129/sysroots/x86_64-oesdk-linux/usr/local’: Permission denied
make: *** [phosphor-logging/elog-errors.hpp] Error 1
-bash-4.2$ pwd
/gsa/ausgsa/projects/i/indiateam/lakshmi/openpower-debug-collector
-bash-4.2$

@lkammath
Copy link

@devenrao can you please fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants