subutai-io/ipfs-deb

Fix problem seen on Vagrant at configure phase

Closed this issue · 1 comments

Creating a peer using Vagrant sometimes poses this error:

default: Setting up ipfs (0.4.15+4) ...
default: Created symlink /etc/systemd/system/multi-user.target.wants/ipfs.service → /lib/systemd/system/ipfs.service.
default: Job for ipfs.service failed because the control process exited with error code.
default: See "systemctl status ipfs.service" and "journalctl -xe" for details.
default: dpkg: error processing package ipfs (--configure):
default: subprocess installed post-installation script returned error exit status 1
default: Setting up libnginx-mod-http-dav-ext (1.10.3-1+deb9u1) ...
default: Setting up libnginx-mod-mail (1.10.3-1+deb9u1) ...
default: Setting up libxpm4:amd64 (1:3.5.12-1) ...
default: Processing triggers for man-db (2.7.6.1-2) ...
default: Setting up libnginx-mod-http-xslt-filter (1.10.3-1+deb9u1) ...
default: Setting up libnginx-mod-http-upstream-fair (1.10.3-1+deb9u1) ...
default: Setting up subutai-p2p (7.1.0+201806291106829) ...
default: Created symlink /etc/systemd/system/multi-user.target.wants/subutai-p2p.service → /lib/systemd/system/subutai-p2p.service.
default: Setting up libnginx-mod-http-geoip (1.10.3-1+deb9u1) ...
default: Setting up libwebp6:amd64 (0.5.2-1) ...
default: Setting up fontconfig-config (2.11.0-6.7) ...
default: Setting up libnginx-mod-stream (1.10.3-1+deb9u1) ...
default: dpkg: dependency problems prevent configuration of subutai:
default: subutai depends on ipfs; however:
default: Package ipfs is not configured yet.
default:
default: dpkg: error processing package subutai (--configure):
default: dependency problems - leaving unconfigured
default: Setting up openvswitch-common (2.6.2pre+git20161223-3) ...
default: Setting up libnginx-mod-http-echo (1.10.3-1+deb9u1) ...
default: Setting up openvswitch-switch (2.6.2
pre+git20161223-3) ...
default: Setting up libfontconfig1:amd64 (2.11.0-6.7+b1) ...
default: Setting up libgd3:amd64 (2.2.4-2+deb9u2) ...
default: Setting up subutai-ovs (7.0.2+201806250755300) ...
default: Synchronizing state of dnsmasq.service with SysV service script with /lib/systemd/systemd-sysv-install.
default: Executing: /lib/systemd/systemd-sysv-install disable dnsmasq
default: Created symlink /etc/systemd/system/subutai-dnsmasq.service → /lib/systemd/system/subutai-dnsmasq.service.
default: Created symlink /etc/systemd/system/multi-user.target.wants/subutai-dnsmasq.service → /lib/systemd/system/subutai-dnsmasq.service.
default: Created symlink /etc/systemd/system/subutai-ovs.service → /lib/systemd/system/subutai-ovs.service.
default: Created symlink /etc/systemd/system/multi-user.target.wants/subutai-ovs.service → /lib/systemd/system/subutai-ovs.service.
default: Setting up libnginx-mod-http-image-filter (1.10.3-1+deb9u1) ...
default: Setting up nginx-full (1.10.3-1+deb9u1) ...
default: Setting up nginx (1.10.3-1+deb9u1) ...
default: Setting up subutai-nginx (0.1+201806250807320) ...
default: Created symlink /etc/systemd/system/multi-user.target.wants/subutai-nginx.service → /lib/systemd/system/subutai-nginx.service.
default: Processing triggers for libc-bin (2.24-11+deb9u3) ...
default: Processing triggers for systemd (232-25+deb9u3) ...
default: Errors were encountered while processing:
default: ipfs
default: subutai
default: E
default: :
default: Sub-process /usr/bin/dpkg returned an error code (1)
default: Container storage already mounted.
default: Provisioning management capabilities (converting RH into peer)
default: This might take a little time ...
default: Error: this command must be run in online mode. Try running 'ipfs daemon' first
default: IPFS swarm with peers not ready

Sometimes at configure phase of ipfs package, there is race condition when ipfs service is not configured but the request of empty Gateway is sent. Special care needs to be taken on avoiding the race.