Possible hostname related bug on 2.12.3 - Node Red issue


#1

Regarding Resin Node Red ( https://github.com/resin-io-projects/resin-node-red )

Right after updating to the new resinos 2.12.3, node-red always creates a new flow file, despite the fact the configuration file specifies the flow location to be at /data/nodered/user and there is a valid file at that location. I wasn’t able, at this time, to get the current location the new flow file is being created at, but it is definitely not at /data, as it should be.
Notice I’m not using multi-container at this time. And things worked as usual before the update.

Are there any changes that impact how /data behaves, even on classic mode?

From the logs:
7 Mar 23:42:40 - [info] Settings file: /usr/src/app/settings.js
17.03.18 23:42:40 (-0300) main 17 Mar 23:42:40 - [info] User directory: /data/node-red/user/
17.03.18 23:42:40 (-0300) main 17 Mar 23:42:40 - [info] Flows file: /data/node-red/user/flows_1b8ab54
17.03.18 23:42:40 (-0300) main .json
17.03.18 23:42:40 (-0300) main 17 Mar 23:42:40 - [info] Creating new flow file
17.03.18 23:42:40 (-0300) main 17 Mar 23:42:40 - [info] Starting flows

EDIT:
The problem seems to be related with the retrieval of the hostname.
Flows are saved by node-red specifying the hostname at /data. Eg:
flows_aaaaaaa.json (where “a” is the hostname).
I’ve notice NR began saving the file as flows_aaaaaaa?.json (where the question mark seems to be a new-line character). By entering the “hostname” command on the terminal, there is a new line printed after the output as well.
This also explains why the log above is truncated after the fourth line.
Can someone corroborate this and verify if there is indeed a mistake on the hostname affecting resinos 2.12.3 ?

EDIT 2:
I can also confirm that the hostname is correct on the host-os, but has a new line character at the end on the container. This did not use to happen on the previous resinos release (2.10.1).


#18

Hi. We are aware of this problem and we looking into this problem.
Can you tell us what version did this device have previously before being updated to 2.12.3?
And also, can you tell us what is the base image you are using?


#25

Hi Florin,

Previous version was 2.10.1rev1.
Base image is Alpine Node Slim 8.9.4

Thanks!


#26

Hi. This will be fixed in the next release 2.12.4 which should be out in the following days
We apologize for the inconvenience