Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
S
slapos.toolbox
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 0
    • Issues 0
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 4
    • Merge Requests 4
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • nexedi
  • slapos.toolbox
  • Merge Requests
  • !75

Open
Opened Feb 04, 2020 by Thomas Gambier@tomo
  • Report abuse
Report abuse

resilient: find doesn't fail if files have wrong permissions

we have webrunners where some files don't belong to correct user in partitions. In this case, find fails and we get this error:

Traceback (most recent call last):
  File "/opt/slapgrid/01ce71861bb9c5883cdbdf8af74c5d1f/bin/runner-exporter", line 83, in <module>
    sys.exit(slapos.resilient.runner_exporter.runExport())
  File "/opt/slapgrid/01ce71861bb9c5883cdbdf8af74c5d1f/eggs/slapos.toolbox-0.100-py2.7.egg/slapos/resilient/runner_exporter.py", line 182, in runExport
    modified_file_list = getBackupFilesModifiedDuringExportList(args, export_start_date)
  File "/opt/slapgrid/01ce71861bb9c5883cdbdf8af74c5d1f/eggs/slapos.toolbox-0.100-py2.7.egg/slapos/resilient/runner_exporter.py", line 106, in getBackupFilesModifiedDuringExportList
    'find', 'instance', '-cmin',  str(export_time / 60), '-type', 'f', '-path', '*/srv/backup/*'
  File "/opt/slapgrid/01ce71861bb9c5883cdbdf8af74c5d1f/parts/python2.7/lib/python2.7/subprocess.py", line 223, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '('find', 'instance', '-cmin', '0.335502366225', '-type', 'f', '-path', '*/srv/backup/*')' returned non-zero exit status 1

Make find don't go into directories with wrong permissions

Check out, review, and merge locally

Step 1. Fetch and check out the branch for this merge request

git fetch origin
git checkout -b tomo_find_resilient origin/tomo_find_resilient

Step 2. Review the changes locally

Step 3. Merge the branch and fix any conflicts that come up

git fetch origin
git checkout origin/master
git merge --no-ff tomo_find_resilient

Step 4. Push the result of the merge to GitLab

git push origin master

Note that pushing to GitLab requires write access to this repository.

Tip: You can also checkout merge requests locally by following these guidelines.

  • Discussion 13
  • Commits 1
  • Changes 1
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View project labels
Reference: nexedi/slapos.toolbox!75
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备14008524号