Skip to content
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

[DPE-2763] POC Status reporting shard side #275

Merged
merged 12 commits into from
Oct 27, 2023

Conversation

MiaAltieri
Copy link
Contributor

@MiaAltieri MiaAltieri commented Oct 19, 2023

Issue

Statuses are not properly reported for shards in update status hook

Solution

Report statuses

Testing

# deploy charms 
juju deploy ./*charm --config role="config-server" config-server-one 
juju deploy ./*charm --config role="shard" shard-one 
juju deploy ./*charm --config role="shard" shard-two 

# speed up frequency of status checks
juju model-config update-status-hook-interval=10s

# monitor `juju status --watch 1s`
Unit                  Workload  Agent  Machine  Public address  Ports            Message
config-server-one/0*  active    idle   2        10.61.64.75     27017-27018/tcp  Primary
shard-one/0*          blocked   idle   0        10.61.64.126    27017/tcp        missing relation to config server
shard-two/0*          blocked   idle   1        10.61.64.216    27017/tcp        missing relation to config server

# relate application
juju integrate config-server-one:config-server shard-one:sharding
juju integrate config-server-one:config-server shard-two:sharding

# monitor `juju status --watch 1s`
Unit                  Workload  Agent  Machine  Public address  Ports            Message
config-server-one/0*  active    idle   2        10.61.64.75     27017-27018/tcp  Primary
shard-one/0*          active    idle   0        10.61.64.126    27017/tcp        Shard connected to config-server: config-server-one
shard-two/0*          active    idle   1        10.61.64.216    27017/tcp        Shard connected to config-server: config-server-one

# remove a relation to shard
juju remove-relation config-server-one:config-server shard-two:sharding

# monitor `juju status --watch 1s`
config-server-one/0*  active    idle   0        10.61.64.50     27017-27018/tcp  Primary
shard-one/0*          active    idle   1        10.61.64.235    27017/tcp        Shard connected to config-server: config-server-one
shard-two/0*          active    idle   2        10.61.64.128    27017/tcp        Shard drained from cluster, ready for removal

# add non supported relation
cd mongodb-operator/tests/integration/relation_tests/new_relations/application-charm
charmcraft pack
juju deploy ./*charm
juju integrate shard-one application

# monitor `juju status --watch 1s`
application/0*        active    idle   3        10.61.64.203
config-server-one/0*  active    idle   0        10.61.64.43     27017-27018/tcp
shard-one/0*          blocked   idle   1        10.61.64.31     27017/tcp        Sharding roles do not support mongodb_client interface.
shard-two/0*          active    idle   2        10.61.64.239    27017/tcp

@MiaAltieri MiaAltieri force-pushed the status-reporting-shard-side branch from 6d5bb95 to fd56c7b Compare October 19, 2023 09:51
@MiaAltieri MiaAltieri changed the title [DPE-2763] Status reporting shard side [DPE-2763] POC Status reporting shard side Oct 19, 2023
Copy link
Contributor

@Mehdi-Bendriss Mehdi-Bendriss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work Mia! just a few points / questions to clarify

lib/charms/mongodb/v1/mongodb_provider.py Outdated Show resolved Hide resolved
lib/charms/mongodb/v1/mongodb_provider.py Outdated Show resolved Hide resolved
lib/charms/mongodb/v1/mongodb_vm_legacy_provider.py Outdated Show resolved Hide resolved
lib/charms/mongodb/v1/mongos.py Show resolved Hide resolved
lib/charms/mongodb/v1/shards_interface.py Outdated Show resolved Hide resolved
lib/charms/mongodb/v1/shards_interface.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
Mehdi-Bendriss
Mehdi-Bendriss previously approved these changes Oct 27, 2023
Mehdi-Bendriss
Mehdi-Bendriss previously approved these changes Oct 27, 2023
@MiaAltieri MiaAltieri merged commit cc52ce1 into 6/edge Oct 27, 2023
16 of 17 checks passed
@MiaAltieri MiaAltieri deleted the status-reporting-shard-side branch October 27, 2023 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants