Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Delayed start services for support- services fail #4159

Merged
merged 1 commit into from
Sep 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cmd/security-spire-config/seed_builtin_entries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,16 @@ echo "SPIFFE_SERVER_SOCKET=${SPIFFE_SERVER_SOCKET}"
echo "SPIFFE_EDGEX_SVID_BASE=${SPIFFE_EDGEX_SVID_BASE}"

# add pre-authorized services into spire server entry
for dockerservice in security-spiffe-token-provider notifications scheduler \
for dockerservice in security-spiffe-token-provider support-notifications support-scheduler \
device-bacnet device-camera device-grove device-modbus device-mqtt device-rest device-snmp \
device-virtual device-rfid-llrp device-coap device-gpio \
app-service-http-export app-service-mqtt-export app-service-sample app-rfid-llrp-inventory \
app-service-external-mqtt-trigger; do
# Temporary workaround because service name in dockerfile is not consistent with service key.
# TAF scripts depend on legacy docker-compose service name. Fix in EdgeX 3.0.
service=`echo -n ${dockerservice} | sed -e 's/app-service-/app-/'`
service=`echo -n ${dockerservice} | sed -e 's/app-service-/app-/'`
# support- services have the opposite problem. service key is right, service name in docker isn't
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue with the core services. Service name is data while the service key is `core-data'. Something we need to clean-up in EdgeX 3.0. I have update this issue to cover App, Core and Support service names.
edgexfoundry/edgex-compose#231

dockerservice=`echo -n ${dockerservice} | sed -e 's/support-//'`
spire-server entry create -socketPath "${SPIFFE_SERVER_SOCKET}" -parentID "${local_agent_svid}" -dns "edgex-${service}" -spiffeID "${SPIFFE_EDGEX_SVID_BASE}/${service}" -selector "docker:label:com.docker.compose.service:${dockerservice}"
done

Expand Down