snapd fails to start

2016-10-19 Thread MikeB
Up until the latest round of updates, I was able to build a custom kernel
and custom image using ubuntu-image as long as I didn't run ubuntu-image
with '-c edge'.  However, regardless of whether I build the image using '-c
edge' or not, my system is pretty much brain dead.

It boots the first time just fine - I'm able to get through the first-boot
configuration, login via ssh, and create my default user.

I then login and install a snap such as hello-world.  This seems to work
fine: ubuntu-core is downloaded first, then hello-world.  I am able to run
hello-world.

I then reboot the system.  Towards the end of the boot, I see the system
fail to start the snappy daemon several times then gives up.

The log from the reboot shows several iterations of the following...

Oct 19 16:37:30 localhost systemd[1]: snapd.service: Service hold-off time
over, scheduling restart.
Oct 19 16:37:30 localhost snapd[1766]: error: cannot downgrade: snapd is
too old for the current system state (patch level 4)
Oct 19 16:37:30 localhost systemd[1]: snapd.service: Main process exited,
code=exited, status=1/FAILURE
Oct 19 16:37:30 localhost systemd[1]: snapd.service: Unit entered failed
state.
Oct 19 16:37:30 localhost systemd[1]: snapd.service: Failed with result
'exit-code'.
Oct 19 16:37:31 localhost systemd[1]: snapd.service: Service hold-off time
over, scheduling restart.
Oct 19 16:37:31 localhost systemd[1]: snapd.service: Start request repeated
too quickly.
Oct 19 16:37:31 localhost systemd[1]: snapd.socket: Unit entered failed
state.

As I said above, up until recently, I've been able to avoid this problem by
NOT using 'edge'.  However, I can no longer work around this.

Can someone help me get past this?  Obviously, without the snappy daemon, I
can't do much on my target system.

Thanks, Mike
-- 
Devices mailing list
Devices@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.snapcraft.io/mailman/listinfo/devices


Re: Snapd fails to start in my custom ubuntu-core

2016-09-09 Thread MikeB
This is a new error...

mberger@bldecos-1:/builds2/mberger/superbee/snappy-ecos$ snapcraft clean &&
rm -rf parts/kernel && rm -rf parts/plugins/__pycache__ && rm -f *.snap &&
snapcraft
Searching for local plugin for x-kernel
Skipping cleaning priming area for kernel (already clean)
Skipping cleaning staging area for kernel (already clean)
Skipping cleaning build for kernel (already clean)
Skipping cleaning pulled source for kernel (already clean)
Searching for local plugin for x-kernel
Preparing to pull kernel
Pulling kernel
Cloning into '/builds2/mberger/superbee/snappy-ecos/parts/kernel/src'...
remote: Counting objects: 56837, done.
remote: Compressing objects: 100% (53458/53458), done.
remote: Total 56837 (delta 5176), reused 20474 (delta 2543)
Receiving objects: 100% (56837/56837), 157.59 MiB | 4.69 MiB/s, done.
Resolving deltas: 100% (5176/5176), done.
Checking connectivity... done.
Checking out files: 100% (53696/53696), done.
Getting details for ubuntu-core
Downloading ubuntu-core
401 Client Error: UNAUTHORIZED for url:
https://public.apps.ubuntu.com/download-snap/b8X2psL1ryVrPt5WEmpYiqfr5emixTd7_524.snap
mberger@bldecos-1:/builds2/mberger/superbee/snappy-ecos$


On Thu, Sep 8, 2016 at 6:58 PM, Luke Williams <luke.willi...@canonical.com>
wrote:

> Wow, I hate typing on my phone. Corrected email below so it actually makes
> sense:
>
> One thing I noticed is that if you build your kernel snap with
> confinement: strict
> It will build your image with the three snaps showing in the snap list
> command, so that when you add other snaps, it does not download the
> Ubuntu-core snap and make the system 100% unstable.
>
> I've also been using the stable channel instead of edge because with the
> edge channel I have not been able to get the device to detect the network
> properly on many devices mainly because it's looking for network, and it
> being a switch, relies on the network drivers to be loaded before the cloud
> init runs which has lead to a boot up time of 5 minutes on initial boot.
>
> On Thursday, September 8, 2016, Luke Williams <luke.willi...@canonical.com>
> wrote:
>
>> Hi Mike,
>>
>> One thing I noticed is that if you build your kernel snap with
>> confinement: strict
>> It will build your image with the three snaps showing in the snap list
>> command, so that when you add other snaps, Jr. Does not download the
>> Ubuntu-core snap and make the system 100% unstable.
>>
>> I've also been using the stable channel instead of edge since the edge
>> channel I have not been able to get the device to detect the network
>> properly on many devices mainly because it's looking for network, and it
>> being a switch, relies on the network drivers to be loaded before the cloud
>> unit rubs, which has lead to a boot up time of 5 minutes on initial boot.
>>
>>
>> On Thursday, September 8, 2016, MikeB <mabnh...@gmail.com> wrote:
>>
>>>
>>> I'm looking to run OpenSwitch on several new whitebox switch platforms
>>> with Snappy/Ubuntu-Core as the native OS.
>>>
>>> Each of these platforms requires a custom kernel in order to boot.
>>> Each of these platforms requires at least one custom kernel driver to
>>> access the network ASIC.
>>> Each of these platforms is initially loaded using ONIE.
>>>
>>> I currently use snapcraft and the kernel plugin to create a custom
>>> kernel snap for each platform.  I apply any necessary kernel patches during
>>> the pull stage through a custom plugin.  I inject the custom .ko driver
>>> files into the parts/kernel/install between the build and stage phases of
>>> snapcraft.
>>>
>>> I then use 'ubuntu-device-flash core 16 --channel=edge --kernel=$snap
>>> --gadget=pc --os=ubuntu-core -o $IMG' to create an image.
>>>
>>> I then use kpartx and ONIE scripts to create an ONIE NOS Installer from
>>> the image I created.
>>>
>>> The most critical problem I have now is that snapd fails to start on my
>>> target systems.  No snapd, no snaps.   I assume it is because 'Sep  8
>>> 10:56:02 localhost snap[853]: error: cannot read assert seed dir: open
>>> /var/lib/snapd/seed/assertions: no such file or directory'.  However, I
>>> also see many instances of the following message: 'Sep  8 11:06:34
>>> localhost snapd[1689]: error: cannot downgrade: snapd is too old for the
>>> current system state (patch level 3)'.
>>>
>>> Regards, Mike
>>>
>>
>>
>> --
>> Thanks,
>>
>>
>> Luke Williams - Technical Partner Manager, Network Switches and
>> Ubuntu-Core
>> luke.willi...@canonical.com
>> www.canonical.com || www.ubuntu.com
>>
>>
>>
>
> --
> Thanks,
>
>
> Luke Williams - Technical Partner Manager, Network Switches and Ubuntu-Core
> luke.willi...@canonical.com
> www.canonical.com || www.ubuntu.com
>
>
>
-- 
Devices mailing list
Devices@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.snapcraft.io/mailman/listinfo/devices