-
Notifications
You must be signed in to change notification settings - Fork 7
Add snapctl wrapper to check connected interfaces #82
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed the test instructions, and the error disappeared as expected.
Additionally, I would like to check the log for is-connected
from the install hook by enabling debugging logs. However, in the Ubuntu Classic environment I cannot find a way to enable it prior to running snap install
and after snap install
the install hook will not be called anymore.
Right. The provider isn't from the same publisher so the connection can only be done manually after installation. A refresh trick mentioned above (now removed) calls the refresh hook which isn't what we want. |
I followed the test instructions to build a UC image with the following modifications, and as expected, the error disappeared:
(model.yaml)
However, I am unable to reproduce the error, and the following error presents while running the image in QEMU:
|
Something is breaking the installation. As usual, you need to enable the debugging to know what. This works on core20: https://gist.github.com/farshidtz/12256b08964a5358a4901fe197c11d76 Alternatively, I think you can remove device-virtual from the model or set its |
With the modification from this PR mentioned above, the installation error regarding the config file has been resolved and everything is functioning properly. With the original setup, a new error, I attempted to reproduce the installation error by removing device-virtual from the model and installing it later via SSH, and it didn't reproduce the previous installation error. To further investigate this new error, I have enabled debugging and reviewed the error details:
|
@farshidtz I identified the anticipated error in the logs and verified that this PR resolves the expected installation issue:
|
…directory Changes to incorporate the following fixes: - canonical/edgex-snap-hooks#83 - canonical/edgex-snap-hooks#82 Signed-off-by: Mengyi Wang <[email protected]>
…directory Changes to incorporate the following fixes: - canonical/edgex-snap-hooks#83 - canonical/edgex-snap-hooks#82 Signed-off-by: Mengyi Wang <[email protected]>
Testing instructions
Reproduce the error
Create a UC model assertion that installs first the config provider, then device virtual (--edge).
Add appropriate connection to the gadget to connect the provider and consumer.
Install and look for expected errors:
error installing config file: open /var/snap/edgex-device-virtual/180/config/device-virtual/res/configuration.toml: read-only file system
Test
Build device virtual from edgexfoundry/device-virtual-go#354
Upload to a branch and change the model assertion to use that instead.
Repeat as above and make sure the error is NOT there.
Enable debugging logs:
snap set edgex-device-virtual debug=true