aws-samples / aws-greengrass-samples

Samples for AWS Greengrass
MIT No Attribution
96 stars 68 forks source link

Dependency Checker: check_cgroups.sh:201 cgroups_dir is empty #4

Closed jayproulx closed 4 years ago

jayproulx commented 6 years ago

I've got a couple of problems trying to configure Raspbian Jessie for Greengrass, first issue is over here:

https://github.com/tianon/cgroupfs-mount/issues/8

Which also seems to be related to this issue, perhaps? Though /sys/fs/cgroup exists and is mounted according to cgroupfs-mount, even if I'm getting some permission denied errors while trying to mount the subfolders.

I output cgroups_dir in the error message on line 206:


    ## Checking if cgroups_dir variable is set - i.e, if cgroups are mounted.
    if [ -z "$cgroups_dir" ]
    then
        message="It looks like the cgroups directory (${cgroups_dir}) is not mounted on the device."
        message="$message\nRefer to the official Greengrass documentation"
        message="$message to fix this."
        fatal "$message"
        add_to_dependency_failures "$message"
        info ""
        return
    fi

And I'm getting

------------------------------------Cgroups check-----------------------------------
It looks like the cgroups directory () is not mounted on the device.
Refer to the official Greengrass documentation to fix this.
jayproulx commented 6 years ago

Just a quick update here, all of the checks in the dependency checker are now passing except for the cgroups check, as above. However, my Docker image is running successfully on my Raspberry Pi, and the cgroup mounts are all available.

So, this looks like a red herring, or the cgroups checks are broken in Docker images. It would be nice to know if I could skip this check so that I can include the dependency checker in my CI/CD, I have to disable all of it in order for my build to pass.

If there's interest, I can put together a pull request for ignoring certain tests.

MikeDombo commented 4 years ago

Closing this as we're now 2 years on.

RaistlinD2x-Dev commented 2 years ago

I'm still running into the same issue where it presents as though cgroups directory isn't mounted except with all checks it's there. Perhaps we can answer the question before closing a ticket?

MikeDombo commented 2 years ago

@RaistlinD2x-Dev, Sorry to hear you're having troubles. Please open a new issue with all the relevant details:

Please note that this dependency checker applies only to Greengrass V1 and not Greengrass V2. Greengrass V1 must not be used for new development work, use Greengrass V2 instead: https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-v2-whats-new.html

If your device has cgroups v2 (unified cgroups) enabled, it must be disabled for this check to pass and for Greengrass to run with container mode. You may still use Greengrass fully in process mode even if the check fails.

To fully qualify your device, use the IoT Device Tester: https://aws.amazon.com/greengrass/device-tester/

Cheers, Michael