logger: remove logentries driver (carry 44442)#46926
Merged
thaJeztah merged 2 commits intomoby:masterfrom Dec 13, 2023
Merged
Conversation
The Logentries service will be discontinued next week: > Dear Logentries user, > > We have identified you as the owner of, or collaborator of, a Logentries account. > > The Logentries service will be discontinued on November 15th, 2022. This means that your Logentries account access will be removed and all your log data will be permanently deleted on this date. > > Next Steps > If you are interested in an alternative Rapid7 log management solution, InsightOps will be available for purchase through December 16th, 2022. Please note, there is no support to migrate your existing Logentries account to InsightOps. > > Thank you for being a valued user of Logentries. > > Thank you, > Rapid7 Customer Success There is no reason to preserve this code in Moby as a result. Signed-off-by: Bjorn Neergaard <bneergaard@mirantis.com> Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Member
Author
|
@neersighted @cpuguy83 PTAL |
thaJeztah
commented
Dec 13, 2023
daemon/daemon.go
Outdated
| // | ||
| // TODO(thaJeztah): remove logentries check and migration code in release v26.0.0. | ||
| if c.HostConfig.LogConfig.Type == "logentries" { | ||
| baseLogger.WithError(err).Warn("migrated deprecated logentries logging driver") |
Member
Author
There was a problem hiding this comment.
Doh! There's no err here (I copied this from the code above, but that has the same issue)
A validation step was added to prevent the daemon from considering "logentries"
as a dynamically loaded plugin, causing it to continue trying to load the plugin;
WARN[2023-12-12T21:53:16.866857127Z] Unable to locate plugin: logentries, retrying in 1s
WARN[2023-12-12T21:53:17.868296836Z] Unable to locate plugin: logentries, retrying in 2s
WARN[2023-12-12T21:53:19.874259254Z] Unable to locate plugin: logentries, retrying in 4s
WARN[2023-12-12T21:53:23.879869881Z] Unable to locate plugin: logentries, retrying in 8s
But would ultimately be returned as an error to the user:
docker container create --name foo --log-driver=logentries nginx:alpine
Error response from daemon: error looking up logging plugin logentries: plugin "logentries" not found
With the additional validation step, an error is returned immediately:
docker container create --log-driver=logentries busybox
Error response from daemon: the logentries logging driver has been deprecated and removed
A migration step was added on container restore. Containers using the
"logentries" logging driver are migrated to use the "local" logging driver:
WARN[2023-12-12T22:38:53.108349297Z] migrated deprecated logentries logging driver container=4c9309fedce75d807340ea1820cc78dc5c774d7bfcae09f3744a91b84ce6e4f7 error="<nil>"
As an alternative to the validation step, I also considered using a "stub"
deprecation driver, however this would not result in an error when creating
the container, and only produce an error when starting:
docker container create --name foo --log-driver=logentries nginx:alpine
4c9309fedce75d807340ea1820cc78dc5c774d7bfcae09f3744a91b84ce6e4f7
docker start foo
Error response from daemon: failed to create task for container: failed to initialize logging driver: the logentries logging driver has been deprecated and removed
Error: failed to start containers: foo
For containers, this validation is added in the backend (daemon). For services,
this was not sufficient, as SwarmKit would try to schedule the task, which
caused a close loop;
docker service create --log-driver=logentries --name foo nginx:alpine
zo0lputagpzaua7cwga4lfmhp
overall progress: 0 out of 1 tasks
1/1: no suitable node (missing plugin on 1 node)
Operation continuing in background.
DEBU[2023-12-12T22:50:28.132732757Z] Calling GET /v1.43/tasks?filters=%7B%22_up-to-date%22%3A%7B%22true%22%3Atrue%7D%2C%22service%22%3A%7B%22zo0lputagpzaua7cwga4lfmhp%22%3Atrue%7D%7D
DEBU[2023-12-12T22:50:28.137961549Z] Calling GET /v1.43/nodes
DEBU[2023-12-12T22:50:28.340665007Z] Calling GET /v1.43/services/zo0lputagpzaua7cwga4lfmhp?insertDefaults=false
DEBU[2023-12-12T22:50:28.343437632Z] Calling GET /v1.43/tasks?filters=%7B%22_up-to-date%22%3A%7B%22true%22%3Atrue%7D%2C%22service%22%3A%7B%22zo0lputagpzaua7cwga4lfmhp%22%3Atrue%7D%7D
DEBU[2023-12-12T22:50:28.345201257Z] Calling GET /v1.43/nodes
So a validation was added in the service create and update endpoints;
docker service create --log-driver=logentries --name foo nginx:alpine
Error response from daemon: the logentries logging driver has been deprecated and removed
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
94af3e5 to
3b1d9f1
Compare
AkihiroSuda
approved these changes
Dec 13, 2023
samuelkarp
approved these changes
Dec 13, 2023
vvoland
approved these changes
Dec 13, 2023
rumpl
approved these changes
Dec 13, 2023
Member
Author
|
Thanks for reviewing! Both the "migration" and "validation" changes are a bit "meh", and there may still be code-paths that could hit issues (considering existing swarm services), but I expect no users still have containers or services around with this driver (with the service discontinued), so it's mostly a "best effort". Let me bring this one in. |
This was referenced Dec 13, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
logger: remove logentries driver
Remove the Logentries (SaaS) log driver from the project, as the service will be discontinued on November 15, 2022:
add validation and migration for deprecated logentries driver
A validation step was added to prevent the daemon from considering "logentries"
as a dynamically loaded plugin, causing it to continue trying to load the plugin;
But would ultimately be returned as an error to the user:
With the additional validation step, an error is returned immediately:
A migration step was added on container restore. Containers using the
"logentries" logging driver are migrated to use the "local" logging driver:
As an alternative to the validation step, I also considered using a "stub"
deprecation driver, however this would not result in an error when creating
the container, and only produce an error when starting:
For containers, this validation is added in the backend (daemon). For services,
this was not sufficient, as SwarmKit would try to schedule the task, which
caused a close loop;
So a validation was added in the service create and update endpoints;
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)