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

build: update spire #4521

Merged
merged 1 commit into from
Apr 24, 2023
Merged

Conversation

bill-mahoney
Copy link
Member

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

New Dependency Instructions (If applicable)

Signed-off-by: Bill Mahoney <[email protected]>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@bill-mahoney bill-mahoney self-assigned this Apr 20, 2023
@bill-mahoney bill-mahoney added the dependencies Pull requests that update a dependency file label Apr 20, 2023
@bill-mahoney bill-mahoney added this to the Minnesota milestone Apr 20, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #4521 (adae084) into main (6ed5f64) will not change coverage.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@           Coverage Diff           @@
##             main    #4521   +/-   ##
=======================================
  Coverage   41.54%   41.54%           
=======================================
  Files         106      106           
  Lines        9764     9764           
=======================================
  Hits         4056     4056           
  Misses       5362     5362           
  Partials      346      346           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@bnevis-i
Copy link
Collaborator

I modified the docker_base dockerfile to use 1.6.3, rebuilt the containers, and ran with "make run dev delayed-start ds-virtual"

ds-virtual is crashing with the following log

Thu Apr 20 23:41:04 UTC 2023 Starting /device-virtual -cp=consul.http://edgex-core-consul:8500 --registry ...
level=INFO ts=2023-04-20T23:41:04.901096963Z app=device-virtual source=secret.go:65 msg="Creating SecretClient"
level=INFO ts=2023-04-20T23:41:04.901209585Z app=device-virtual source=variables.go:457 msg="Variables override of 'SecretStore/RuntimeTokenProvider/Enabled' by environment variable: SECRETSTORE_RUNTIMETOKENPROVIDER_ENABLED=true"
level=INFO ts=2023-04-20T23:41:04.901227451Z app=device-virtual source=variables.go:457 msg="Variables override of 'SecretStore/RuntimeTokenProvider/Host' by environment variable: SECRETSTORE_RUNTIMETOKENPROVIDER_HOST=edgex-security-spiffe-token-provider"
level=INFO ts=2023-04-20T23:41:04.901240979Z app=device-virtual source=variables.go:457 msg="Variables override of 'SecretStore/Host' by environment variable: SECRETSTORE_HOST=edgex-vault"
level=INFO ts=2023-04-20T23:41:04.901604423Z app=device-virtual source=secret.go:164 msg="SecretStore information created with 3 overrides applied"
level=INFO ts=2023-04-20T23:41:04.901794513Z app=device-virtual source=secret.go:75 msg="Reading secret store configuration and authentication token"
level=INFO ts=2023-04-20T23:41:04.901813643Z app=device-virtual source=secret.go:201 msg="runtime token provider enabled"
level=INFO ts=2023-04-20T23:41:04.901822367Z app=device-virtual source=methods.go:138 msg="using Unix Domain Socket at unix:///tmp/edgex/secrets/spiffe/public/api.sock"
level=INFO ts=2023-04-20T23:41:04.956445138Z app=device-virtual source=methods.go:150 msg="workload got X509 source"
level=INFO ts=2023-04-20T23:41:05.098172629Z app=device-virtual source=methods.go:120 msg="successfully got token from spiffe-token-provider!"
level=INFO ts=2023-04-20T23:41:05.098297608Z app=device-virtual source=secret.go:93 msg="Attempting to create secret client"
level=INFO ts=2023-04-20T23:41:05.100223137Z app=device-virtual source=secret.go:104 msg="Created SecretClient"
level=INFO ts=2023-04-20T23:41:05.100238486Z app=device-virtual source=secret.go:109 msg="SecretsFile not set, skipping seeding of service secrets."
level=INFO ts=2023-04-20T23:41:05.100313056Z app=device-virtual source=secrets.go:277 msg="kick off token renewal with interval: 30m0s"
level=INFO ts=2023-04-20T23:41:05.114417989Z app=device-virtual source=secrets.go:149 msg="successfully generated Consul token for service device-virtual"
level=INFO ts=2023-04-20T23:41:05.114477599Z app=device-virtual source=config.go:600 msg="Using Configuration provider (consul) from: http://edgex-core-consul:8500 with base path of edgex/v3/core-common-config-bootstrapper/all-services"
level=INFO ts=2023-04-20T23:41:05.117145768Z app=device-virtual source=config.go:324 msg="loading the common configuration for service type device-service"
level=INFO ts=2023-04-20T23:41:05.122404341Z app=device-virtual source=secrets.go:149 msg="successfully generated Consul token for service device-virtual"
level=INFO ts=2023-04-20T23:41:05.122436545Z app=device-virtual source=config.go:600 msg="Using Configuration provider (consul) from: http://edgex-core-consul:8500 with base path of edgex/v3/core-common-config-bootstrapper/device-services"
level=INFO ts=2023-04-20T23:41:05.12499848Z app=device-virtual source=config.go:144 msg="Common configuration loaded from the Configuration Provider. No overrides applied"
level=INFO ts=2023-04-20T23:41:05.1290572Z app=device-virtual source=secrets.go:149 msg="successfully generated Consul token for service device-virtual"
level=INFO ts=2023-04-20T23:41:05.129081187Z app=device-virtual source=config.go:600 msg="Using Configuration provider (consul) from: http://edgex-core-consul:8500 with base path of edgex/v3/device-virtual"
level=INFO ts=2023-04-20T23:41:05.130939241Z app=device-virtual source=config.go:189 msg="Private configuration loaded from the Configuration Provider. No overrides applied"
level=INFO ts=2023-04-20T23:41:05.13095876Z app=device-virtual source=config.go:240 msg="listening for private config changes"
level=INFO ts=2023-04-20T23:41:05.130965223Z app=device-virtual source=config.go:242 msg="listening for all services common config changes"
level=INFO ts=2023-04-20T23:41:05.130971019Z app=device-virtual source=config.go:249 msg="listening for device service common config changes"
level=INFO ts=2023-04-20T23:41:05.137106809Z app=device-virtual source=secrets.go:149 msg="successfully generated Consul token for service device-virtual"
level=INFO ts=2023-04-20T23:41:05.13712687Z app=device-virtual source=registry.go:61 msg="Using Registry access token of length 36"
level=INFO ts=2023-04-20T23:41:05.137132871Z app=device-virtual source=registry.go:85 msg="Using Registry (consul) from http://edgex-core-consul:8500"
level=INFO ts=2023-04-20T23:41:05.149798283Z app=device-virtual source=httpserver.go:133 msg="Web server starting (edgex-device-virtual:59900)"
level=INFO ts=2023-04-20T23:41:05.14982368Z app=device-virtual source=messaging.go:66 msg="Setting options for secure MessageBus with AuthMode='usernamepassword' and SecretName='redisdb"
level=INFO ts=2023-04-20T23:41:05.150629615Z app=device-virtual source=messaging.go:104 msg="Connected to redis Message Bus @ redis://edgex-redis:6379 with AuthMode='usernamepassword'"
level=INFO ts=2023-04-20T23:41:05.150647778Z app=device-virtual source=command.go:34 msg="Subscribing to command requests on topic: edgex/device/command/request/device-virtual/#"
level=INFO ts=2023-04-20T23:41:05.150653936Z app=device-virtual source=command.go:37 msg="Responses to command requests will be published on topic: edgex/response/device-virtual/<requestId>"
level=INFO ts=2023-04-20T23:41:05.151267235Z app=device-virtual source=callback.go:32 msg="Subscribing to System Events on topic: edgex/system-events/core-metadata/+/+/device-virtual/#"
level=INFO ts=2023-04-20T23:41:05.151704225Z app=device-virtual source=validation.go:29 msg="Subscribing to device validation requests on topic: edgex/device-virtual/validate/device"
level=INFO ts=2023-04-20T23:41:05.151715452Z app=device-virtual source=validation.go:32 msg="Responses to device validation requests will be published on topic: edgex/response/device-virtual/<requestId>"
level=INFO ts=2023-04-20T23:41:05.156772358Z app=device-virtual source=manager.go:127 msg="Metrics Manager started with a report interval of 30s"
level=INFO ts=2023-04-20T23:41:05.15741069Z app=device-virtual source=clients.go:183 msg="Using registry for URL for 'core-metadata': http://edgex-core-metadata:59881"
level=INFO ts=2023-04-20T23:41:05.157444146Z app=device-virtual source=restrouter.go:57 msg="Registering v2 routes..."
level=ERROR ts=2023-04-20T23:41:05.159624868Z app=device-virtual source=init.go:53 msg="Failed to init cache: request failed, status code: 404, err: 404 page not found\n"
level=INFO ts=2023-04-20T23:41:05.159639674Z app=device-virtual source=bootstrap.go:146 msg="Un-Registering service from the Registry"
level=INFO ts=2023-04-20T23:41:05.159689307Z app=device-virtual source=manager.go:109 msg="Exited Metrics Manager Run..."
level=INFO ts=2023-04-20T23:41:05.159700548Z app=device-virtual source=validation.go:53 msg="Exiting waiting for MessageBus 'edgex/device-virtual/validate/device' topic messages"
level=INFO ts=2023-04-20T23:41:05.159714352Z app=device-virtual source=callback.go:53 msg="Exiting waiting for MessageBus 'edgex/system-events/core-metadata/+/+/device-virtual/#' topic messages"
level=INFO ts=2023-04-20T23:41:05.159720161Z app=device-virtual source=command.go:58 msg="Exiting waiting for MessageBus 'edgex/device/command/request/device-virtual/#' topic messages"
level=INFO ts=2023-04-20T23:41:05.159786087Z app=device-virtual source=messaging.go:95 msg="Disconnected from MessageBus"
level=INFO ts=2023-04-20T23:41:05.159825919Z app=device-virtual source=httpserver.go:158 msg="Web server stopped"
level=INFO ts=2023-04-20T23:41:05.159836668Z app=device-virtual source=httpserver.go:130 msg="Web server shut down"
level=INFO ts=2023-04-20T23:41:05.159849967Z app=device-virtual source=config.go:721 msg="Watching for 'Writable' configuration changes has stopped"
level=INFO ts=2023-04-20T23:41:05.159858376Z app=device-virtual source=config.go:659 msg="Watching for 'Writable' configuration changes has stopped"
level=INFO ts=2023-04-20T23:41:05.159866389Z app=device-virtual source=config.go:721 msg="Watching for 'Writable' configuration changes has stopped"
level=INFO ts=2023-04-20T23:41:05.159894069Z app=device-virtual source=secrets.go:285 msg="context cancelled, dismiss the token renewal process"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0xbe3320]

goroutine 1 [running]:
github.com/edgexfoundry/device-virtual-go/internal/driver.(*VirtualDriver).Stop(0xc00011ea20, 0x8?)
	github.com/edgexfoundry/device-virtual-go/internal/driver/virtualdriver.go:122 +0x20
github.com/edgexfoundry/device-sdk-go/v3/pkg/service.(*deviceService).Stop(0xc00041dd60, 0x20?)
	github.com/edgexfoundry/device-sdk-go/[email protected]/pkg/service/service.go:298 +0x2a
github.com/edgexfoundry/device-sdk-go/v3/pkg/service.(*deviceService).Run.func4()
	github.com/edgexfoundry/device-sdk-go/[email protected]/pkg/service/service.go:146 +0x32
github.com/edgexfoundry/device-sdk-go/v3/pkg/service.(*deviceService).Run(0xc00041dd60)
	github.com/edgexfoundry/device-sdk-go/[email protected]/pkg/service/service.go:151 +0xba5
github.com/edgexfoundry/device-sdk-go/v3/pkg/startup.Bootstrap({0xdc1957, 0xe}, {0xedd3a0, 0xc}, {0xeecef0?, 0xc00011ea20})
	github.com/edgexfoundry/device-sdk-go/[email protected]/pkg/startup/bootstrap.go:25 +0x218
main.main()
	github.com/edgexfoundry/device-virtual-go/cmd/main.go:22 +0x3e

Somehow this is related to the upgrade.

@bnevis-i
Copy link
Collaborator

Breaking change #4519 is interfering with testing. Will try to go to the version before this and test.

Copy link
Collaborator

@bnevis-i bnevis-i left a comment

Choose a reason for hiding this comment

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

Backing out the /v3 change resolves the issues.

@bill-mahoney bill-mahoney merged commit 50d4b10 into edgexfoundry:main Apr 24, 2023
@bill-mahoney bill-mahoney deleted the spire-update branch April 24, 2023 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants