Skip to content

Missing CAN J1939 support and vcan0 in latest docket image. #618

Closed

Description

Hi,

I recently found that J1939 is not compiled into the latest docker image.

https://gitlab.com/Menschel/socketcan/-/jobs/1315560259

This may be caused by not having

linux/can/j1939.h

available at compile time.

The above mentioned tox tests runs smoothly on a raspberry pi with natively compiled Python 3.9.5.

Last but not least, It would be great if the docker images would have vcan0 enabled by default.
I'm using vcan0 for tests and coverage in pipeline.

Thank you very much.

Activity

  1. added
    RequestRequest for image modification or feature
    on Jun 7, 2021
  2. tianon commented on Jun 7, 2021

    @tianon
    Member

    Can you provide a simple reproducer, perhaps in the form of a single docker run one-liner that imports a module which currently fails but will succeed if we have the appropriate header available during compilation?

  3. yosifkit commented on Jun 7, 2021

    @yosifkit
    Member

    It looks like j1939.h doesn't exist until Debian Bullseye which has not migrated to stable yet, so we don't have a python image based on it.

    https://packages.debian.org/search?suite=buster&searchon=contents&keywords=j1939.h
    https://packages.debian.org/search?suite=bullseye&searchon=contents&keywords=j1939.h

    If python were compiled with this support, would it have issues running for users still on kernels earlier than 5.10?

  4. yosifkit commented on Jun 8, 2021

    @yosifkit
    Member

    Just checked, I was active in raspbian repo 25 days ago, so I don't understand how this header file did not make it into bullseye while raspbian buster already had it.
    raspberrypi/linux#4346

    It is in Bullseye, but Bullseye is not yet fully released so we haven't made an image based upon it. When it is released, we will add an image.


    For vcan devices, that is likely just missing capabilities (probably --cap-add NET_ADMIN). But I don't know if things like gitlab runners allow a cap-add. So nothing we can do in the image.

    $ docker run -it --rm debian
    Unable to find image 'debian:latest' locally
    latest: Pulling from library/debian
    Digest: sha256:acf7795dc91df17e10effee064bd229580a9c34213b4dba578d64768af5d8c51
    Status: Downloaded newer image for debian:latest
    root@92473bfa43af:/# ip link add type vcan
    RTNETLINK answers: Operation not permitted
    root@92473bfa43af:/# 
  5. tianon commented on Aug 20, 2021

    @tianon
    Member

    Fixed by #633 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    RequestRequest for image modification or feature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions