IoT core greengrass fleet provision device side effectiveConfig.yaml does not have updated thingName

1

Trying to use provision by claim and provisioning hook to admit the device. The provisioning hook output will return a formatted thingName rather than the name passed into the provisioning hook,

const requestedThingName = input.parameters.ThingName;

....

const output = {
    allowProvisioning: True,
    parameterOverrides: {
        ThingName: newThingName,
    },

this works, but on the device side, after iot mqtt session successfully established, in /greengrass/v2/config/effectiveConfig.yaml, the file looks like this:

system:

certificateFilePath: ""

privateKeyPath: ""

rootCaPath: ""

rootpath: "/greengrass/v2"

thingName: ""

services:

aws.greengrass.FleetProvisioningByClaim:

configuration:

I would expect, updated thingName is there under thingName key.

I can only see the newThingName in config.tlog: {"TS":1649181903995,"TP":["setenv","AWS_IOT_THING_NAME"],"W":"changed","V":"newThingName"}

I think effectiveConfig.yaml should be updated.

질문됨 2년 전535회 조회
1개 답변
1

Hello,

The effective config file is only written on Greengrass startup and shutdown. If you were to shutdown Greengrass you should then see the most recent values of the configuration reflected in the effective config file. The effective config file is only ever written, it is not used by Greengrass for any purposes. If you want to see the true state of things, the config.tlog file is always the source of truth.

AWS
전문가
답변함 2년 전
profile pictureAWS
전문가
Greg_B
검토됨 6달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠