Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Add create and destroy resource #2178

Merged
merged 1 commit into from
Nov 17, 2020
Merged

Add create and destroy resource #2178

merged 1 commit into from
Nov 17, 2020

Conversation

utopiabound
Copy link
Contributor

@utopiabound utopiabound commented Aug 21, 2020

Related #1464

Signed-off-by: Nathaniel Clark nclark@whamcloud.com


This change is Reviewable

johnsonw
johnsonw previously approved these changes Aug 26, 2020
Base automatically changed from rust-ha to master August 28, 2020 21:00
@jgrund jgrund dismissed johnsonw’s stale review August 28, 2020 21:00

The base branch was changed.

@utopiabound utopiabound requested review from johnsonw and a team August 31, 2020 13:45
@johnsonw
Copy link
Contributor

johnsonw commented Sep 1, 2020

Looks like there are a couple of clippy errors and wondering if we need to keep the comment.

ip1981
ip1981 previously approved these changes Sep 3, 2020
iml-agent/src/action_plugins/action_plugin.rs Show resolved Hide resolved
johnsonw
johnsonw previously approved these changes Sep 3, 2020
ip1981
ip1981 previously approved these changes Sep 10, 2020
@jgrund jgrund self-requested a review October 20, 2020 20:35
Copy link
Member

@jgrund jgrund left a 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 we should use Elementtree when we have a streaming parser that does the same thing in a more error-tolerant way.

@jgrund
Copy link
Member

jgrund commented Nov 11, 2020

Looks like this has a conflict on latest master.

Related #1464

Add ability to add cloned resources
Add test for create_resource()
Add cloned_client and flesh out pacemaker constraints
Address review comments
Start normal resources, not cloned client
Account for missing templates
Add destroy cloned client
Add constraint ids to destroy_resource
Only call umount when the mount is mounted
Fix missing return
Fix cloned init check and wait
Rename PacemakerOperations.is_some for clarity
Move crm commands to correct module

Signed-off-by: Nathaniel Clark <nclark@whamcloud.com>
cibxpath(
"delete",
&format!(
"//resources/primitive[@id=\"{}\"]/meta_attributes",
Copy link
Member

Choose a reason for hiding this comment

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

nit:

Suggested change
"//resources/primitive[@id=\"{}\"]/meta_attributes",
r#"//resources/primitive[@id="{}"]/meta_attributes"#,

pub async fn create_single_resource(
(agent, constraints): (ResourceAgentInfo, Vec<ResourceConstraint>),
) -> Result<(), ImlAgentError> {
let ids = resource_list().await?;
Copy link
Member

Choose a reason for hiding this comment

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

An reason read_crm_output could not be used here instead?

@jgrund jgrund self-requested a review November 17, 2020 15:18
@jgrund jgrund merged commit 3bd33d5 into master Nov 17, 2020
@jgrund jgrund deleted the rust-ha-create branch November 17, 2020 15:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
5 participants