-
Notifications
You must be signed in to change notification settings - Fork 359
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
fix: reject reconnecting agents with different resource pool configuration #9815
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
d3caacd
fix: reject reconnecting agents with different resource pool configur…
ShreyaLnuHpe b4a24f7
add e2e test
ShreyaLnuHpe 61384cf
Merge branch 'main' into shreya/agentRestart
ShreyaLnuHpe 2a4d4f2
add extra test cases
ShreyaLnuHpe 8076a1b
defaulted resource pool in options
ShreyaLnuHpe cbf6884
correct e2e test with new fixture
ShreyaLnuHpe 47bea5b
correct e2e test with new fixture
ShreyaLnuHpe d93bb75
Sort in conftest.py
ShreyaLnuHpe 556220b
create restartable managed cluster
ShreyaLnuHpe b3eb2d0
change port for connection
ShreyaLnuHpe 69920f5
Test new mark
ShreyaLnuHpe 27825d2
remove comments/unused lines
ShreyaLnuHpe 178a096
minor correction
ShreyaLnuHpe 4877be6
changes based on comments
ShreyaLnuHpe 5342281
add newline
ShreyaLnuHpe 6af1bd5
Merge branch 'main' into shreya/agentRestart
ShreyaLnuHpe f329db4
add note
ShreyaLnuHpe 2cbf48f
correct the note
ShreyaLnuHpe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
111 changes: 111 additions & 0 deletions
111
.circleci/devcluster/multi-resource-pools.devcluster.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
stages: | ||
- db: | ||
name: db | ||
port: 5434 | ||
|
||
- master: | ||
pre: | ||
- sh: make -C tools prep-root | ||
config_file: | ||
security: | ||
initial_user_password: $INITIAL_USER_PASSWORD | ||
db: | ||
host: localhost | ||
port: 5434 | ||
password: postgres | ||
user: postgres | ||
name: determined | ||
__internal: | ||
preemption_timeout: 60s | ||
checkpoint_storage: | ||
type: shared_fs | ||
host_path: /tmp | ||
storage_path: determined-cp | ||
log: | ||
level: debug | ||
root: tools/build | ||
cache: | ||
cache_dir: /tmp/determined-cache | ||
launch_error: false | ||
telemetry: | ||
enabled: false | ||
resource_manager: | ||
default_aux_resource_pool: default | ||
default_compute_resource_pool: default | ||
scheduler: | ||
fitting_policy: best | ||
type: fair_share | ||
type: agent | ||
resource_pools: | ||
- agent_reattach_enabled: true | ||
agent_reconnect_wait: 25s | ||
description: '' | ||
max_aux_containers_per_agent: 100 | ||
pool_name: default | ||
provider: null | ||
task_container_defaults: null | ||
- pool_name: pool1 | ||
max_slots: 8 | ||
scheduler: | ||
type: priority | ||
scim: | ||
enabled: true | ||
auth: | ||
type: basic | ||
username: determined | ||
password: password | ||
|
||
- custom: | ||
name: proxy | ||
cmd: ["socat", "-d", "-d", "TCP-LISTEN:8081,reuseaddr,fork", "TCP:localhost:8080"] | ||
post: | ||
- conncheck: | ||
port: 8081 | ||
|
||
- agent: | ||
name: agent1 | ||
config_file: | ||
master_host: 127.0.0.1 | ||
master_port: 8081 | ||
agent_id: agent1 | ||
container_master_host: $DOCKER_LOCALHOST | ||
agent_reconnect_attempts: 24 | ||
agent_reconnect_backoff: 5 | ||
container_auto_remove_disabled: true | ||
hooks: | ||
on_connection_lost: ["touch", "/tmp/agent1-connection-lost"] | ||
|
||
|
||
- agent: | ||
name: agent2 | ||
config_file: | ||
master_host: 127.0.0.1 | ||
master_port: 8081 | ||
agent_id: agent2 | ||
container_master_host: $DOCKER_LOCALHOST | ||
agent_reconnect_attempts: 24 | ||
agent_reconnect_backoff: 5 | ||
container_auto_remove_disabled: true | ||
|
||
- agent: | ||
name: agent10 # Copy of agent1, but with different resource pool. | ||
config_file: | ||
master_host: 127.0.0.1 | ||
master_port: 8081 | ||
agent_id: agent1 | ||
container_master_host: $DOCKER_LOCALHOST | ||
agent_reconnect_attempts: 24 | ||
agent_reconnect_backoff: 5 | ||
container_auto_remove_disabled: true | ||
resource_pool: pool1 | ||
|
||
- agent: | ||
name: agent20 # Copy of agent1, but with empty(default) resource pool. | ||
config_file: | ||
master_host: 127.0.0.1 | ||
master_port: 8081 | ||
agent_id: agent1 | ||
container_master_host: $DOCKER_LOCALHOST | ||
agent_reconnect_attempts: 24 | ||
agent_reconnect_backoff: 5 | ||
container_auto_remove_disabled: true |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,6 +58,7 @@ log: | |
log: | ||
level: trace | ||
color: true | ||
resource_pool: default | ||
slot_type: auto | ||
security: | ||
tls: | ||
|
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Option 1 (DONE): Create a separate E2E test for the .circleci/devcluster/multi-resource-pools.devcluster.yaml config file to allow for broader test coverage in the future.
Option 2: Add a parallel run within test-e2e-managed-devcluster for the new config file.
https://circleci.com/docs/parallelism-faster-jobs/
In both options, the overall execution time of the CircleCI test-e2e runs remains unaffected since they run in parallel with other E2E tests.
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 think option 1 is good for now, when we need broader coverage we can decide how to split things up!