6. Maintenance¶
This page describes common routines for maintaining hardshare configurations and shared devices. Another page provides detailed discussion about Best practices.
6.2. After first installation, instance status INIT_FAIL¶
There are many reasons why an instance can fail to initialize, depending on your configuration. For a newly configured hardshare installation that uses Docker, first check that the Docker image is compatible with your host architecture. To do this, first
hardshare config -l
and find the Docker image line; for example,
cprovider: docker
cargs: []
img: rerobots/hs-generic
indicates the image rerobots/hs-generic:latest (“latest” is implied if not present). Now, get your host architecture as known to Linux:
# uname -m
x86_64
The output might be different, such as armv7l
on some Raspyberry Pi
boards. Continuing the example above, we can pull the base generic Docker image
for x86_64 hosts:
docker image pull rerobots/hs-generic:x86_64-latest
and update the hardshare configuration with the tag name:
hardshare config --assign-image rerobots/hs-generic:x86_64-latest
Now restart the hardshare daemon:
hardshare stop-ad
hardshare ad -d
Finally, request an instance as usual.
6.3. Daemon fails to start or is not responsive¶
hardshare status
- daemon_found: false
has_instance: false
provider: podman
warnings:
- fail to open daemon socket at /home/scott/.rerobots/hardshare.b47cd57c-833b-47c1-964d-79e5e6f00dba.sock
wdeployment: b47cd57c-833b-47c1-964d-79e5e6f00dba
Delete the .sock
file shown.
6.4. List local configurations¶
hardshare --format=yaml config -l
local:
err_keys: {}
keys:
- /home/scott/.rerobots/keys/jwt.txt
ssh_key: /home/scott/.ssh/unodist
version: 0
wdeployments:
- cargs: []
container_name: rrc
cprovider: podman
id: b47cd57c-833b-47c1-964d-79e5e6f00dba
image: hs-generic
init_inside: []
owner: scott
terminate: []
remote:
deployments:
- date_created: 2020-05-25 06:27 UTC
id: b47cd57c-833b-47c1-964d-79e5e6f00dba
origin: null
owner: scott
6.5. Start, check, and stop daemons¶
hardshare ad -d
hardshare status
hardshare stop-ad
6.6. Update API tokens¶
Remove any expired API tokens:
hardshare config -p
Then, get a new API token, and add it:
hardshare config --add-key path/to/your/jwt.txt