Anything changed around snapcraft.yaml / gpio interface for 2.36?


#1

Hey,

We have noticed today some strange errors coming from snapd when trying to refresh core snap to the one from the edge channel (2.35.4 -> 16-2.36~pre1+git957.cd2479b). Please find the logs below:

admin@C032031826-00053:~$ snap change 81
Status   Spawn               Ready               Summary
Undo     today at 07:17 UTC  today at 07:17 UTC  Ensure prerequisites for "core" are available
Undo     today at 07:17 UTC  today at 07:17 UTC  Download snap "core" (5702) from channel "edge"
Undo     today at 07:17 UTC  today at 07:18 UTC  Fetch and check assertions for snap "core" (5702)
Undo     today at 07:17 UTC  today at 07:18 UTC  Mount snap "core" (5702)
Undo     today at 07:17 UTC  today at 07:18 UTC  Run pre-refresh hook of "core" snap if present
Undo     today at 07:17 UTC  today at 07:18 UTC  Stop snap "core" services
Undo     today at 07:17 UTC  today at 07:18 UTC  Remove aliases for snap "core"
Undo     today at 07:17 UTC  today at 07:18 UTC  Make current revision for snap "core" unavailable
Undo     today at 07:17 UTC  today at 07:18 UTC  Copy snap "core" data
Undoing  today at 07:17 UTC  today at 07:19 UTC  Setup snap "core" (5702) security profiles
Undone   today at 07:17 UTC  today at 07:22 UTC  Make snap "core" (5702) available to the system
Undone   today at 07:17 UTC  today at 07:22 UTC  Automatically connect eligible plugs and slots of snap "core"
Hold     today at 07:17 UTC  today at 07:22 UTC  Set automatic aliases for snap "core"
Hold     today at 07:17 UTC  today at 07:22 UTC  Setup snap "core" aliases
Hold     today at 07:17 UTC  today at 07:22 UTC  Run post-refresh hook of "core" snap if present
Hold     today at 07:17 UTC  today at 07:22 UTC  Start snap "core" (5702) services
Hold     today at 07:17 UTC  today at 07:22 UTC  Clean up "core" (5702) install
Hold     today at 07:17 UTC  today at 07:22 UTC  Run configure hook of "core" snap if present
Undone   today at 07:21 UTC  today at 07:22 UTC  Run hook prepare-plug-system-observe of snap "edge-connect"
Undone   today at 07:21 UTC  today at 07:22 UTC  Run hook prepare-slot-system-observe of snap "core"
Error    today at 07:21 UTC  today at 07:22 UTC  Connect edge-connect:system-observe to core:system-observe
Hold     today at 07:21 UTC  today at 07:22 UTC  Run hook connect-slot-system-observe of snap "core"
Hold     today at 07:21 UTC  today at 07:22 UTC  Run hook connect-plug-system-observe of snap "edge-connect"

......................................................................
Make snap "core" (5702) available to the system

2018-10-11T07:19:16Z INFO Requested system restart.

......................................................................
Automatically connect eligible plugs and slots of snap "core"

2018-10-11T07:19:20Z INFO Waiting for restart...

......................................................................
Connect edge-connect:system-observe to core:system-observe

2018-10-11T07:22:04Z ERROR cannot setup apparmor for snap "edge-connect": cannot obtain apparmor specification for snap "edge-connect": snap "gadget" has interface "gpio" with invalid value type for "number" attribute
2018-10-11T07:22:07Z ERROR cannot obtain apparmor specification for snap "edge-connect": snap "gadget" has interface "gpio" with invalid value type for "number" attribute

admin@C032031826-00053:~$

The snapcraft.yaml for gadget snap has the following definitions related to gpio interface repeated:

slots:
    gpio-N:
        interface: gpio
        number: N

where N changes from 1 to 133

Then if I go back to any earlier core version, like for example from stable channel then the update is ok.

33   Error   today at 14:48 UTC  today at 15:04 UTC  Refresh "core" snap from "edge"
34   Done    today at 16:02 UTC  today at 16:11 UTC  Refresh "core" snap

the above shows change 33 that was to edge which failed and then back to stable that succeeded.


#2

The error message is not ideal it should at least include what type was read from the yaml. I pushed a PR that adds this data: https://github.com/snapcore/snapd/pull/5971 - once this is in we hopefully get a better idea. It might be something silly as int vs int64 but its hard to say. Do you get this error on an amd64 or an arm device?


#3

I get this error on arm.


#4

The error is now more descriptive:

......................................................................
Setup snap "core" (5713) security profiles

2018-10-12T15:22:29Z ERROR cannot setup systemd for snap "cascade": cannot obtain systemd services for snap "gadget": snap "gadget" has interface "gpio" with invalid value type "float64" for "number" attribute
2018-10-12T15:22:30Z ERROR cannot obtain systemd services for snap "gadget": snap "gadget" has interface "gpio" with invalid value type "float64" for "number" attribute

......................................................................
Make snap "core" (5713) available to the system

2018-10-12T15:16:13Z INFO Requested system restart.

......................................................................
Connect edge-connect:system-observe to core:system-observe

2018-10-12T15:22:16Z ERROR cannot setup apparmor for snap "edge-connect": cannot obtain apparmor specification for snap "edge-connect": snap "gadget" has interface "gpio" with invalid value type "float64" for "number" attribute
2018-10-12T15:22:18Z ERROR cannot obtain apparmor specification for snap "edge-connect": snap "gadget" has interface "gpio" with invalid value type "float64" for "number" attribute


``

#5

Hey, just for my own understanding what are the next steps for this issue and projected timeline?

Thanks,
KZ


#6

Hey @koza , I had see today the same error message, but other devices running fine with stable core
I hope that someone have an idea, the device is currently not reachable

  • Disconnect systembundle:pins from pi3:bcm-gpio-22 (cannot setup apparmor for snap “systembundle”: cannot obtain apparmor specification for snap “systembundle”: snap “pi3” has interface “gpio” with invalid value type “float64” for “number” attribute)
  • Disconnect systembundle:pins from pi3:bcm-gpio-22 (cannot obtain apparmor specification for snap “systembundle”: snap “pi3” has interface “gpio” with invalid value type “float64” for “number” attribute)
  • Disconnect systembundle:pins from pi3:bcm-gpio-17 (cannot setup apparmor for snap “systembundle”: cannot obtain apparmor specification for snap “systembundle”: snap “pi3” has interface “gpio” with invalid value type “float64” for “number” attribute)
  • Disconnect systembundle:pins from pi3:bcm-gpio-17 (cannot obtain apparmor specification for snap “systembundle”: snap “pi3” has interface “gpio” with invalid value type “float64” for “number” attribute)
  • Disconnect systembundle:pins from pi3:bcm-gpio-5 (cannot setup apparmor for snap “systembundle”: cannot obtain apparmor specification for snap “systembundle”: snap “pi3” has interface “gpio” with invalid value type “float64” for “number” attribute)
  • Disconnect systembundle:pins from pi3:bcm-gpio-5 (cannot obtain apparmor specification for snap “systembundle”: snap “pi3” has interface “gpio” with invalid value type “float64” for “number” attribute)