balena-supervisor icon indicating copy to clipboard operation
balena-supervisor copied to clipboard

Ignore container hostname from the list of aliases when comparing networks

Open pipex opened this issue 2 years ago • 4 comments

Since moby v20.10.0 (and since balena engine v20.10.12) the engine the service hostname as an extra alias to the network configuration (see https://github.com/moby/moby/pull/39204).

This means that current and target state no longer match when comparing networks, leading to a restart loop for the service.

[warn] Ignoring unsupported or unknown compose fields: containerName
[debug] Networks do not match!
[debug] Current network:
[debug] {"aliases":["myservice","5f0b0df5ab26","balena.local"]}
[debug] New network:
[debug] {"aliases":["myservice"]}
[debug] Replacing container for service myservice because of config changes:
[debug] Network changes detected
[debug] Networks do not match!
[debug] Current network:
[debug] {"aliases":["myservice","5f0b0df5ab26","balena.local"]}
[debug] New network:
[debug] {"aliases":["myservice"]}

The supervisor needs to consider this case and take out the hostname from current and target when making the comparison here

https://github.com/balena-os/balena-supervisor/blob/a2f739789dc3e253c7c047689ab0ec91b58b777a/src/compose/service.ts#L1057-L1072

pipex avatar Apr 11 '22 15:04 pipex

+1 from me, looking to run something like https://www.smallnetbuilder.com/wireless/wireless-howto/33187-build-a-wi-fi-performance-analyzer-for-75-part-1

rodcul avatar Mar 15 '18 13:03 rodcul

Support for this, and the newer NanoPi Neo 2 Black (which is roughly the same, but noteable changes include more RAM + eMMC socket) would be incredible!

Especially since this little package provides you with an inexpensive, readily available, off-the-shelf solution for an IoT device with user feedback (small OLED display) and user input (three customizable buttons): https://www.friendlyarm.com/index.php?route=product/product&product_id=276 OLED-NEO2B_en_10

The only thing missing is integrated WiFi, but that wouldn't be a problem for my use case.

I don't know, should there be a separate issue for the Neo 2 Black despite it's similarity to the Neo 2?

EDIT: I just saw that the link in the previous comment also mentions the case including display and buttons. I have been searching for a while now, if somebody knows about a similar off-the-shelf package with small display and some buttons that already works with balena I would be very thankful!

spodskubka avatar Mar 22 '20 11:03 spodskubka