-
Notifications
You must be signed in to change notification settings - Fork 78
Adding location field for starting and listing containers #303
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
Conversation
Pull Request Test Coverage Report for Build 18838834993Details
💛 - Coveralls |
robshakir
left a comment
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.
This seems a reasonable change to me. No concerns.
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.
Need to describe what happens if a supervisor role changes: do we start/stop containers according to the new roles automatically?
| // location defines where a container should run. If a container is started | ||
| // on the backup, it is expected that any resources (image, volume, etc) | ||
| // be replicated to the backup prior to actually starting the container. | ||
| // This parameter cannot be updated, but rather the container needs to be |
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.
What happens if the supervisor role changes?
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.
PRIMARY should always point to the current PRIMARY and same goes for BACKUP.
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.
One alternate here is to have this be a component reference that allows one to specify the name of the component the container should be launched on. It requires knowledge of the component name (potentially a downside because this is not uniform, whereas PRIMARY and BACKUP are), but would be extensible to allow for containers to be launched on other components in the future.
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.
PRIMARY should always point to the current PRIMARY and same goes for BACKUP.
Of course, but the question what happens to the already deployed containers?
Let's say you launch containers foo on primary and bar on backup (with the restart policy=always), and the primary reboots. Then:
footemporary goes offline- the control module that hosted
bartransitions from backup to primary role.- do we stop
bar? - do we launch
foo?
- do we stop
- the other control module comes back online after the reboot in the backup role
- do we restart
foo(which was initially deployed to run on primary)? - do we start
bar?
- do we restart
Indeed, the Rob's suggestion would work if your objective is a static placement (instead of a dynamic container placement that follows the role). It really depends on the use case.
From the current description I can't tell any of this.
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.
Good point - I think the discussion revolves around what happens when a backup card comes back online. I think we can distinguish to cases, dual and single, where dual mode both cards are available, and single mode where only one card is available.
- Device is in dual mode: Containers should be placed according to the location parameter.
- Device is in single mode: All containers should be running on the remaining card.
One nuance may be the ALL location where the two containers where running on both cards, when the device is in single mode there should still only be one instance of the container.
We could introduce another state which could be BACKUP_ONLY meaning that a container can only run on a backup and therefore if there is no backup card available then the container does not run.
PRIMARY_ONLY does not make sense since there is always a primary.
Does this make sense to you? If yes, I will update the spec.
I think Rob's suggestion could be accommodated by adding a COMPONENT state which indicated that a the location will be specified in a field holding the component name.
containerz/containerz.proto
Outdated
| // Devices to be added to the container. | ||
| repeated Device devices = 14; | ||
|
|
||
| // Location describes where a resources (image, container, volume) is located. |
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.
I don't think it describes the image placement (and possibly volume placement)? Aren't the images always synchronized between active and standby?
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.
It does not specify image placement as images are provided by the Deploy RPC. Images should probably be replicated to the primary and backup all time, but the spec does not mandate when those images should be replicated.
But this comment is not accurate - I updated it to reflect a more accurate description.
|
Another consideration, and I don't know if you already thought about it and whether it requires any modifications to the .proto, is related to networking. gnoi/containerz/containerz.proto Line 416 in ac4853c
What we discussed previously was that network (typically) will be set to host, and host should imply the namespace where the request was received.This host logic won't work for deployments on backup or all. It would be nice to understand what's the plan here (we can move this conversation to gchat/buganizer if that'd be preferred)
|
|
Let's have this conversation over chat or a meet and bring it back here. I am not sure I follow the reasoning here. |
I think the meaning of |
0457a71 to
ce173cf
Compare
No description provided.