-
Notifications
You must be signed in to change notification settings - Fork 17
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
[WIP] Deprecate services.json and workload-mapping.json #235
Open
jordigilh
wants to merge
13
commits into
project-flotta:main
Choose a base branch
from
jordigilh:deprecate_services_json
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
* Moved event listener instance and initialization to cmd.go main * Added a file system watcher to the systemd enabled services directory to be notified of new services from being enabled/disabled so that the event listener can track their status * Encapsulated the code to listen to service events generated by the systemd event listener so that it is called at the last line of the cmd.go#main function to make sure all observers are ready before start processing the service events
…ceived to avoid potential race condition between file system event and dbus event
jordigilh
force-pushed
the
deprecate_services_json
branch
from
August 11, 2022 19:51
65ab237
to
394a471
Compare
jordigilh
changed the title
[WIP] Deprecate services json
[WIP] Deprecate services.json and workload-mapping.json
Aug 11, 2022
…ppings for running workloads * services.json: this file was used to list related services to the main service. Each related service manages a container in the pod spec. With the change we now extract this information from the BoundBy property in the main service. * workload-mapping.json: this file contains the mapping from the pod name and the pod ID. It was used to retrieve the pod ID based on the workload name and retrieve the pod report from podman. However, as it happens, the pod name equals to the workload name, and podman allows retrieval of the pod report with the pod ID or the pod name as argument, making this mapping no longer necessary. * Added missing error validation for starting and stopping services, including the validation whether the service exists or not before performing the action to avoid errors for "service not found".
jordigilh
force-pushed
the
deprecate_services_json
branch
from
August 11, 2022 19:59
394a471
to
84d1280
Compare
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.
Notes
Please review the last commit as this PR builds on the other PR I created to refactor the events to use systemd instead of podman.
84d1280
TL;DR
Removed logic to handle services.json and workload-mapping.json as mappings for running workloads
Description
services.json
: this file was used to list related services to the main service. Each related service manages a container in the pod spec. With the change we now extract this information from theBoundBy
property in the main service.workload-mapping.json
: this file contains the mapping from the pod name and the pod ID. It was used to retrieve the pod ID based on the workload name and retrieve the pod report from podman. However, as it happens, the pod name equals to the workload name, and podman allows retrieval of the pod report with the pod ID or the pod name as argument, making this mapping no longer necessary.service not found
.