Skip to content

hpc-config-push fails when one SFTP server is dead #5

Description

@rezib

For example:

[root-admin1-pts2] ~# hpc-config-push 
[hiera-eyaml-core] Loaded config from /root/.eyaml/config.yaml
[hiera-eyaml-core] Loaded config from /root/.eyaml/config.yaml
INFO: Reenc Files: Reencrypted 4962 files, 0 errors
INFO: creating archive /tmp/puppet-config-push/tmp28o7jhkl/infra/puppet-config-environment.tar.xz
WARNING: Configured private modules dir is missing: 'hpc-privatedata/puppet-config/toto/modules'
WARNING: Configured private manifests dir is missing: 'hpc-privatedata/puppet-config/toto/manifests'
INFO: creating archive /tmp/puppet-config-push/tmp28o7jhkl/user/puppet-config-environment.tar.xz
WARNING: Configured private modules dir is missing: 'hpc-privatedata/puppet-config/toto/modules'
WARNING: Configured private manifests dir is missing: 'hpc-privatedata/puppet-config/toto/manifests'
[hiera-eyaml-core] Loaded config from /root/.eyaml/config.yaml
[hiera-eyaml-core] Loaded config from /root/.eyaml/config.yaml
INFO: SFTP push: pushing data on hosts ['service1', 'service2', 'service3', 'service4']
INFO: SFTP push: Finished host 0/4
INFO: SFTP push: Finished host 0/4
INFO: SFTP push: Finished host 0/4
INFO: SFTP push: Finished host 0/4
ERROR: SFTP push: SSH failed to root@service2
INFO: SFTP push: SSH error: Unable to connect to service2: [Errno 113] No route to host.
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 1/4
INFO: SFTP push: Finished host 3/4
INFO: SFTP push: Finished host 4/4
multiprocessing.pool.RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/usr/lib/python3.5/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/sbin/hpc-config-push", line 974, in _sftp_push_host
    _sftp_rmrf(sftp_client, conf.destination)
  File "/usr/sbin/hpc-config-push", line 911, in _sftp_rmrf
    if _sftp_is_dir(sftp_client, path):
  File "/usr/sbin/hpc-config-push", line 884, in _sftp_is_dir
    is_dir = stat.S_ISDIR(sftp_client.stat(path).st_mode)
AttributeError: 'NoneType' object has no attribute 'stat'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/sbin/hpc-config-push", line 1169, in <module>
    main()
  File "/usr/sbin/hpc-config-push", line 1165, in main
    push()
  File "/usr/sbin/hpc-config-push", line 1019, in push
    _push_sftp()
  File "/usr/sbin/hpc-config-push", line 1009, in _push_sftp
    result.get()
  File "/usr/lib/python3.5/multiprocessing/pool.py", line 608, in get
    raise self._value
AttributeError: 'NoneType' object has no attribute 'stat'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions