vespene-io / _old_vespene

DISCONTINUED: a frozen fork will exist forever at mpdehaan/vespene
http://vespene.io/
Apache License 2.0
650 stars 66 forks source link

Build fails at execute_command #76

Closed varunchopra closed 6 years ago

varunchopra commented 6 years ago

Bug description: Created a test build with the script:

#!/bin/bash
echo "replace this section"

Getting this in the message:

    0.00m | mkdir -p 3
    0.00m | chmod 770 3
    0.00m | ----------
Pre hooks...
    0.00m | running build asunder user: nobody
    0.00m | ----------
Building...
    0.00m | chmod -R 777 3
    0.00m | chmod: cannot access '3': No such file or directory

    0.00m | build failed with exit code 1
    0.00m | ----------
Post hooks...

Running cat /var/log/vespene/worker_tutorial-pool.log:

2018-11-03 01:54:54,031 - vespene - INFO - serving queue: tutorial-pool
2018-11-03 01:55:21,757 - vespene - INFO - serving queue: tutorial-pool
2018-11-03 01:56:51,018 - vespene - DEBUG - building: 3, project: Testing Vespene
2018-11-03 01:56:51,053 - vespene - DEBUG - executing: mkdir -p 3
2018-11-03 01:56:51,073 - vespene - DEBUG - executing: chmod 770 3
2018-11-03 01:56:51,102 - vespene - DEBUG - executing: chmod -R 777 3
2018-11-03 01:56:51,120 - vespene - ERROR - an error occurred
Traceback (most recent call last):
  File "/opt/vespene/vespene/workers/builder.py", line 158, in go
    self.main()
  File "/opt/vespene/vespene/workers/builder.py", line 69, in main
    self.run_build_script()
  File "/opt/vespene/vespene/workers/builder.py", line 91, in run_build_script
    self.isolation_manager.execute()
  File "/opt/vespene/vespene/workers/isolation.py", line 55, in execute
    return self.provider.execute()
  File "/opt/vespene/vespene/plugins/isolation/sudo.py", line 84, in execute
    commands.execute_command(self.build, "chmod -R %s %s" % (self.chmod, self.build.working_dir), output_log=False, message_log=True)
  File "/opt/vespene/vespene/workers/commands.py", line 132, in execute_command
    raise Exception("Failed")
Exception: Failed
2018-11-03 01:56:51,124 - vespene - DEBUG - flagging build as failure
2018-11-03 01:56:51,130 - vespene - DEBUG - flagging build as done

Steps to reproduce: Create a new project with some test code, re-use the tutorial worker. (this is on a fresh install, I haven't actually run any of the tutorial projects (deleted them))

Operating system and version: Ubuntu 18.04 LTS

I'm guessing this is a permissions issue. I've installed vespene using a vespene user.

mpdehaan commented 6 years ago

Your build root is probably not configured - not sure how that got erased. Duplicate of #68 about providing some error messages earlier when this happens feel free to comment there. Set your build root and you should be further along. Thanks!