aws-iot-builder-tools / aws-greengrass-provisioner

Simplifies provisioning Greengrass Cores and building Greengrass Lambda functions
Apache License 2.0
54 stars 15 forks source link

Starting a container created with --build-container fails #34

Closed Sandmania closed 5 years ago

Sandmania commented 5 years ago

After creating a container with java -jar ../aws-greengrass-provisioner/build/libs/AwsGreengrassProvisioner.jar -g xx -d deployments/cdd-skeleton.conf -c -a X86_64 and then trying to start it with docker run -p 8883:8883 greengrass:xx it fails with:

Setting up greengrass daemon
Validating hardlink/softlink protection
Found cgroup subsystem:  name=systemd
Found cgroup subsystem:  pids
Found cgroup subsystem:  hugetlb
Found cgroup subsystem:  net_prio
Found cgroup subsystem:  perf_event
Found cgroup subsystem:  net_cls
Found cgroup subsystem:  freezer
Found cgroup subsystem:  devices
Found cgroup subsystem:  memory
Found cgroup subsystem:  blkio
Found cgroup subsystem:  cpuacct
Found cgroup subsystem:  cpu
Found cgroup subsystem:  cpuset
failed to create overlay fs for container nosysRootfs operation not permitted
The Greengrass daemon process with [pid = 62] died

Maybe I'm just missing something from the startup command?

timmattison commented 5 years ago

Which OS are you using? The -c option was created before there was an official cross-platform Docker container so it only works on Linux. Have you tried --docker-launch? That will use the official container.

I should do some testing and either remove it or just change it to use the new container if it doesn't work for people.

Sandmania commented 5 years ago

Running on macOS Mojave and --docker-launch works if I modify the running container a bit. See #33

timmattison commented 5 years ago

I have fixed the build container issue by switching to the official Docker container, running all functions without the Greengrass container, and running in privileged mode.

timmattison commented 5 years ago

@Sandmania you'll need the latest version of the aws-greengrass-lambda-functions repo with the new Dockerfile.X86_64. That uses the official Greengrass container.

timmattison commented 5 years ago

Fixed in #41