slipstream / SlipStreamClient

SlipStream Python client
Apache License 2.0
1 stars 4 forks source link

workflow recipe might not be available on fs yet before we attempt to execute it #379

Open konstan opened 6 years ago

konstan commented 6 years ago

There might be a microsec difference. We probably need to sync fs after writing the file before we attempt to launch it.

: 2018-02-06T15:01:51Z : Calling: /var/lib/slipstream/module_apps_containers_rancher_16339__post-install

: 2018-02-06T15:01:51Z :
ERROR: Failing... Failed running 'module/apps/Containers/Rancher/16339:Post-install' script on 'machine': [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/opt/slipstream/client/lib/slipstream/executors/MachineExecutor.py", line 278, in _launch_script
    rc, stderr_last_line = self._run_target_script(script, exports, ignore_abort=ignore_abort, name=name)
  File "/opt/slipstream/client/lib/slipstream/executors/MachineExecutor.py", line 307, in _run_target_script
    process = self._launch_process(target_script, exports, name)
  File "/opt/slipstream/client/lib/slipstream/executors/MachineExecutor.py", line 398, in _launch_process
    process = util.execute(fn, noWait=True, extra_env=exports, withStderr=True)
  File "/opt/slipstream/client/lib/slipstream/util.py", line 259, in execute
    process = subprocess.Popen(commandAndArgsList, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
root@machine7c48abc3-4bb6-4b76-b4bc-c836fd0bea07:~# stat /var/lib/slipstream/module_apps_containers_rancher_16339__post-install
  File: '/var/lib/slipstream/module_apps_containers_rancher_16339__post-install'
  Size: 235             Blocks: 8          IO Block: 4096   regular file
Device: fd01h/64769d    Inode: 257643      Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2018-02-06 15:01:51.258282886 +0000
Modify: 2018-02-06 15:01:51.254282792 +0000
Change: 2018-02-06 15:01:51.254282792 +0000
 Birth: -
root@machine7c48abc3-4bb6-4b76-b4bc-c836fd0bea07:~#