juju-solutions / layer-flannel

0 stars 2 forks source link

No such file or directory: 'subnet.env' #2

Closed mbruzek closed 8 years ago

mbruzek commented 8 years ago

While using a charm build on this layer I found an error more than once.

# hooks/etcd-relation-joined 
++ config-get iface
+ interface=eth0
++ config-get cidr
+ cidr=10.1.0.0/16
+ connection_string=http://172.31.62.172:4001,http://172.31.14.86:4001,http://172.31.29.189:4001
+ '[' -f /var/run/docker-bootstrap.pid ']'
+ echo 'Docker bootstrap instance pid found. Doing nothing.'
Docker bootstrap instance pid found. Doing nothing.
+ exit 0
Traceback (most recent call last):
  File "hooks/etcd-relation-joined", line 19, in <module>
    main()
  File "/usr/local/lib/python3.4/dist-packages/charms/reactive/__init__.py", line 73, in main
    bus.dispatch()
  File "/usr/local/lib/python3.4/dist-packages/charms/reactive/bus.py", line 421, in dispatch
    _invoke(other_handlers)
  File "/usr/local/lib/python3.4/dist-packages/charms/reactive/bus.py", line 404, in _invoke
    handler.invoke()
  File "/usr/local/lib/python3.4/dist-packages/charms/reactive/bus.py", line 280, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-kubernetes-2/charm/reactive/flannel.py", line 39, in run_bootstrap_daemons
    ingest_network_config()
  File "/var/lib/juju/agents/unit-kubernetes-2/charm/reactive/flannel.py", line 54, in ingest_network_config
    with open('subnet.env') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'subnet.env'

Even if this is an intermittent error, we should look into fixing it. Retrying in the same cycle does not seem to fix it, so I don't think a for loop would help here. If the code can recover from this another way I would like to do that to make the layer more robust.

lazypower commented 8 years ago

closed with #6