-
Notifications
You must be signed in to change notification settings - Fork 484
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(snap): kong migrations up before Kong startup #4223
build(snap): kong migrations up before Kong startup #4223
Conversation
Signed-off-by: Farshid Tavakolizadeh <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@farshidtz Thank you, looks good. Here is my test result:
$ snap install edgexfoundry --channel=latest/stable
edgexfoundry 2.2.0+2 from Canonical✓ installed
$ snap refresh edgexfoundry --channel=latest/edge/pr-4223
edgexfoundry (edge/issue-4221) 2.3.0-dev.99 from Canonical✓ refreshed
$ snap logs -f edgexfoundry.kong-daemon
2022-10-26T16:33:19+02:00 systemd[1]: Stopping Service for snap application edgexfoundry.kong-daemon...
2022-10-26T16:33:19+02:00 edgexfoundry.kong-daemon[663847]: Kong stopped
2022-10-26T16:33:19+02:00 systemd[1]: snap.edgexfoundry.kong-daemon.service: Succeeded.
2022-10-26T16:33:19+02:00 systemd[1]: Stopped Service for snap application edgexfoundry.kong-daemon.
2022-10-26T16:33:39+02:00 systemd[1]: Starting Service for snap application edgexfoundry.kong-daemon...
2022-10-26T16:33:39+02:00 edgexfoundry.kong-daemon[664409]: 2022/10/26 16:33:39 [warn] ulimit is currently set to "1024". For better performance set it to at least "4096" using "ulimit -n"
2022-10-26T16:33:39+02:00 edgexfoundry.kong-daemon[664409]: migrating core on database 'kong'...
2022-10-26T16:33:39+02:00 edgexfoundry.kong-daemon[664409]: core migrated up to: 014_230_to_270 (executed)
2022-10-26T16:33:39+02:00 edgexfoundry.kong-daemon[664409]: core migrated up to: 015_270_to_280 (executed)
2022-10-26T16:33:39+02:00 edgexfoundry.kong-daemon[664409]: 2 migrations processed
2022-10-26T16:33:39+02:00 edgexfoundry.kong-daemon[664409]: 2 executed
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664426]: parse successful, beginning import
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664426]: import successful
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [warn] ulimit is currently set to "1024". For better performance set it to at least "4096" using "ulimit -n"
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [verbose] Kong: 2.8.2
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [verbose] reading config file at /var/snap/edgexfoundry/4065/config/security-proxy-setup/kong.conf
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [verbose] prefix in use: /var/snap/edgexfoundry/current/kong
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [verbose] preparing nginx prefix directory at /var/snap/edgexfoundry/current/kong
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [verbose] SSL enabled on
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [verbose] proxy SSL certificate found at /var/snap/edgexfoundry/current/kong/ssl/kong-default.crt
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [verbose] proxy SSL certificate found at /var/snap/edgexfoundry/current/kong/ssl/kong-default-ecdsa.crt
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [verbose] SSL enabled on
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [verbose] admin SSL certificate found at /var/snap/edgexfoundry/current/kong/ssl/admin-kong-default.crt
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [verbose] admin SSL certificate found at /var/snap/edgexfoundry/current/kong/ssl/admin-kong-default-ecdsa.crt
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [verbose] retrieving database schema state...
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [verbose] schema state retrieved
2022-10-26T16:33:40+02:00 edgexfoundry.kong-daemon[664439]: 2022/10/26 16:33:40 [info] Kong started
2022-10-26T16:33:40+02:00 systemd[1]: Started Service for snap application edgexfoundry.kong-daemon.
Codecov Report
@@ Coverage Diff @@
## main #4223 +/- ##
=======================================
Coverage 43.29% 43.29%
=======================================
Files 125 125
Lines 11126 11126
=======================================
Hits 4817 4817
Misses 5896 5896
Partials 413 413 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Farshid Tavakolizadeh <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the result of refresh test:
$ snap install edgexfoundry --channel=latest/stable
edgexfoundry 2.2.0+2 from Canonical✓ installed
$ snap refresh edgexfoundry --channel=edge/pr-4223
edgexfoundry (edge/pr-4223) 2.3.0-dev.99 from Canonical✓ refreshed
$ snap logs -f edgexfoundry.kong-daemon
Okt 26 17:05:28 ubuntu systemd[1]: Stopping Service for snap application edgexfoundry.kong-daemon...
Okt 26 17:05:28 ubuntu edgexfoundry.kong-daemon[10001]: Kong stopped
Okt 26 17:05:28 ubuntu systemd[1]: snap.edgexfoundry.kong-daemon.service: Succeeded.
Okt 26 17:05:28 ubuntu systemd[1]: Stopped Service for snap application edgexfoundry.kong-daemon.
Okt 26 17:05:32 ubuntu snapd[1208]: services.go:1046: RemoveSnapServices - disabling snap.edgexfoundry.kong-daemon.service
Okt 26 17:05:33 ubuntu audit[10117]: AVC apparmor="STATUS" operation="profile_replace" profile="unconfined" name="snap.edgexfoundry.kong-daemon" pid=10117 comm="apparmor_parser"
Okt 26 17:05:59 ubuntu systemd[1]: Starting Service for snap application edgexfoundry.kong-daemon...
Okt 26 17:05:59 ubuntu edgexfoundry.kong-daemon[10570]: 2022/10/26 17:05:59 [warn] ulimit is currently set to "1024". For better performance set it to at least "4096" using "ulimit -n"
Okt 26 17:05:59 ubuntu edgexfoundry.kong-daemon[10570]: Database already bootstrapped
Okt 26 17:05:59 ubuntu edgexfoundry.kong-daemon[10582]: 2022/10/26 17:05:59 [warn] ulimit is currently set to "1024". For better performance set it to at least "4096" using "ulimit -n"
Okt 26 17:06:00 ubuntu edgexfoundry.kong-daemon[10582]: migrating core on database 'kong'...
Okt 26 17:06:00 ubuntu edgexfoundry.kong-daemon[10582]: core migrated up to: 014_230_to_270 (executed)
Okt 26 17:06:00 ubuntu edgexfoundry.kong-daemon[10582]: core migrated up to: 015_270_to_280 (executed)
Okt 26 17:06:00 ubuntu edgexfoundry.kong-daemon[10582]: 2 migrations processed
Okt 26 17:06:00 ubuntu edgexfoundry.kong-daemon[10582]: 2 executed
Okt 26 17:06:00 ubuntu edgexfoundry.kong-daemon[10599]: parse successful, beginning import
Okt 26 17:06:00 ubuntu edgexfoundry.kong-daemon[10599]: import successful
Okt 26 17:06:00 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:00 [warn] ulimit is currently set to "1024". For better performance set it to at least "4096" using "ulimit -n"
Okt 26 17:06:01 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:00 [verbose] Kong: 2.8.2
Okt 26 17:06:01 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:00 [verbose] reading config file at /var/snap/edgexfoundry/4066/config/security-proxy-setup/kong.conf
Okt 26 17:06:01 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:00 [verbose] prefix in use: /var/snap/edgexfoundry/current/kong
Okt 26 17:06:01 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:00 [verbose] preparing nginx prefix directory at /var/snap/edgexfoundry/current/kong
Okt 26 17:06:01 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:00 [verbose] SSL enabled on
Okt 26 17:06:01 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:00 [verbose] proxy SSL certificate found at /var/snap/edgexfoundry/current/kong/ssl/kong-default.crt
Okt 26 17:06:01 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:00 [verbose] proxy SSL certificate found at /var/snap/edgexfoundry/current/kong/ssl/kong-default-ecdsa.crt
Okt 26 17:06:01 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:00 [verbose] SSL enabled on
Okt 26 17:06:01 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:00 [verbose] admin SSL certificate found at /var/snap/edgexfoundry/current/kong/ssl/admin-kong-default.crt
Okt 26 17:06:01 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:00 [verbose] admin SSL certificate found at /var/snap/edgexfoundry/current/kong/ssl/admin-kong-default-ecdsa.crt
Okt 26 17:06:01 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:01 [verbose] retrieving database schema state...
Okt 26 17:06:01 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:01 [verbose] schema state retrieved
Okt 26 17:06:01 ubuntu edgexfoundry.kong-daemon[10612]: 2022/10/26 17:06:01 [info] Kong started
Okt 26 17:06:01 ubuntu systemd[1]: Started Service for snap application edgexfoundry.kong-daemon.
Fixes #4221
Also, bumps to latest stable kong, i.e. 2.8.2.
Signed-off-by: Farshid Tavakolizadeh [email protected]
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:
BREAKING CHANGE:
describing the break)Testing Instructions
New Dependency Instructions (If applicable)