Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 124
    • Merge requests 124
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !235

Merged
Created Oct 03, 2017 by Jérome Perrin@jeromeOwner

slaprunner: provide pidfile in config file for slapos node

  • Overview 16
  • Commits 3
  • Changes 4

Thanks to !158 (merged) , in a slaprunner we can use slapos command:

$ slapos supply https://lab.nexedi.com/nexedi/slapos/raw/1.0.19/software/erp5/software.cfg slaprunner

works fine to supply a software to "current" webrunner, but building this software with slapos node software fails with:

$ slapos node software
2017-10-03 02:46:33 slapos[29536] CRITICAL slapgrid could not write pidfile /opt/slapos/slapgrid-sr.pid
2017-10-03 02:46:33 slapos[29536] ERROR [Errno 13] Permission denied: '/opt/slapos/slapgrid-sr.pid'
Traceback (most recent call last):
  File "/opt/slapgrid/f496eadc03f1ac5a0ab1e4ae60bbe972/eggs/slapos.core-1.4.1-py2.7.egg/slapos/cli/entry.py", line 300, in run_subcommand
    result = cmd.run(parsed_args)
  File "/opt/slapgrid/f496eadc03f1ac5a0ab1e4ae60bbe972/eggs/slapos.core-1.4.1-py2.7.egg/slapos/cli/command.py", line 50, in run
    return self.take_action(parsed_args)
  File "/opt/slapgrid/f496eadc03f1ac5a0ab1e4ae60bbe972/eggs/slapos.core-1.4.1-py2.7.egg/slapos/cli/slapgrid.py", line 116, in take_action
    setRunning(logger=self.app.log, pidfile=pidfile)
  File "/opt/slapgrid/f496eadc03f1ac5a0ab1e4ae60bbe972/eggs/slapos.core-1.4.1-py2.7.egg/slapos/grid/utils.py", line 155, in setRunning
    write_pid(logger, pidfile)
  File "/opt/slapgrid/f496eadc03f1ac5a0ab1e4ae60bbe972/eggs/slapos.core-1.4.1-py2.7.egg/slapos/grid/utils.py", line 167, in write_pid
    with open(pidfile, 'w') as fout:
IOError: [Errno 13] Permission denied: '/opt/slapos/slapgrid-sr.pid'

because slaprunner's web interface also runs software, it's better both slapos node software command and the one from slaprunner web interface uses the same pid file so that they do not run in parallel.

This depends on slapos.core!29 (merged)

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: feat/slaprunner_slapos_command
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7