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

Commit

Permalink
Fixup
Browse files Browse the repository at this point in the history
Signed-off-by: johnsonw <wjohnson@whamcloud.com>
  • Loading branch information
johnsonw committed Nov 18, 2020
1 parent 1b599aa commit 72906ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
6 changes: 3 additions & 3 deletions iml-agent/src/action_plugins/lustre/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async fn build_snapshot(
comment: Option<String>,
mounts: &[device_types::mount::Mount],
) -> Result<Option<Snapshot>, ImlAgentError> {
let mut fs_name = target.rsplitn(1, '-').nth(1).map(String::from);
let mut fs_name = target.rsplitn(2, '-').nth(1).map(String::from);
let filesystem_name = if let Some(name) = fs_name.take() {
name
} else {
Expand All @@ -114,7 +114,7 @@ async fn build_snapshot(
.find_map(|x| {
let s = x.opts.0.split(',').find(|x| x.starts_with("svname="))?;

let s = s.split('=').nth(1)?.rsplitn(1, '-').nth(1)?;
let s = s.split('=').nth(1)?.rsplitn(2, '-').nth(1)?;

if s == snapshot_fsname {
return Some(true);
Expand Down Expand Up @@ -147,7 +147,7 @@ async fn get_snapshot_label(
snapshot_name,
])
.await?;
let x = x.trim().rsplitn(1, '-').nth(1).map(String::from);
let x = x.trim().rsplitn(2, '-').nth(1).map(String::from);

Ok(x)
}
Expand Down
2 changes: 1 addition & 1 deletion iml-agent/src/daemon_plugins/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async fn list() -> Result<Option<HashMap<String, Vec<Snapshot>>>, ImlAgentError>
}

let xs = xs.into_iter().map(|x| async move {
let fs_name = x.rsplitn(1, '-').nth(1);
let fs_name = x.rsplitn(2, '-').nth(1);
tracing::debug!("fs_name is: {:?}", fs_name);

if let Some(fs_name) = fs_name {
Expand Down
15 changes: 1 addition & 14 deletions sqlx-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -1955,19 +1955,6 @@
]
}
},
"628b472cfdf32ba54540531b117c31b3787c03b05ddf57e03cdf840c71155bde": {
"query": "\n DELETE FROM snapshot\n WHERE (filesystem_name, snapshot_name) NOT IN (SELECT * FROM UNNEST ($1::text[], $2::text[]))\n ",
"describe": {
"columns": [],
"parameters": {
"Left": [
"TextArray",
"TextArray"
]
},
"nullable": []
}
},
"681d997bb965a228c0aa75d93d09faefe5412daaf3e7bda3630df319fb9edabb": {
"query": "select * from django_content_type",
"describe": {
Expand Down Expand Up @@ -4664,4 +4651,4 @@
]
}
}
}
}

0 comments on commit 72906ae

Please sign in to comment.