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

DAOS-4441 Placement: Modify Placement for OS Reintegration #2402

Merged
merged 23 commits into from
Jun 17, 2020
Merged

Conversation

PetFet
Copy link
Contributor

@PetFet PetFet commented Apr 11, 2020

Modified the placement API functionality so that now when
a reintegration operation is ongoing it will temporarily extend
the layout to include the reintegrating targets.

Signed-off-by: Peter Fetros [email protected]

Modified the placement API functionality so that now when
a reintegration operation is ongoing it will temporarily extend
the layout to include the reintegrating targets.

Signed-off-by: Peter Fetros <[email protected]>
@daosbuild1
Copy link
Collaborator

@PetFet PetFet requested review from NiuYawei and gnailzenh April 13, 2020 22:56
@PetFet
Copy link
Contributor Author

PetFet commented Apr 13, 2020

#2284 Needs to be landed first if possible.

@PetFet PetFet requested review from byron-marohn and wangdi1 April 13, 2020 22:58
PL_REBUILD,
PL_REINT,
PL_ADD,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

It's better to put some comments to explain these ops, that'll be helpful for understanding the code.

Copy link
Contributor

Choose a reason for hiding this comment

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

what is the difference between PL_PLACE_EXTENDED and PL_ADD?

Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

* PL_PLACE_EXTENDED calculates an extended layout for use when there
* is a reintegration operation currently ongoing.
*
* PL_REINT calculates the post-reintegration layout for use during
Copy link
Collaborator

Choose a reason for hiding this comment

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

(style) trailing whitespace

@@ -31,6 +31,27 @@
#include <daos/pool_map.h>
#include <isa-l.h>


/*
* These ops determine whether extra information is calculated during
Copy link
Collaborator

Choose a reason for hiding this comment

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

(style) trailing whitespace

@daosbuild1
Copy link
Collaborator

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on CentOS 7 completed with status UNSTABLE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-2402/3/execution/node/209/log

Signed-off-by: Peter Fetros <[email protected]>
@daosbuild1 daosbuild1 dismissed their stale review April 20, 2020 18:55

Updated patch

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on CentOS 7 completed with status UNSTABLE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-2402/4/execution/node/210/log

NiuYawei
NiuYawei previously approved these changes Apr 23, 2020
Copy link
Collaborator

@daosbuild1 daosbuild1 left a comment

Choose a reason for hiding this comment

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

src/placement/tests/place_obj_common.c Outdated Show resolved Hide resolved
src/placement/tests/place_obj_common.c Outdated Show resolved Hide resolved
@daosbuild1
Copy link
Collaborator

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on Leap 15 completed with status UNSTABLE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-2402/5/execution/node/206/log

@daosbuild1
Copy link
Collaborator

Test stage Build RPM on CentOS 7 completed with status UNSTABLE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-2402/5/execution/node/209/log

@daosbuild1
Copy link
Collaborator

Test stage Build on Ubuntu 18.04 with Clang completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-2402/5/execution/node/201/log

@daosbuild1
Copy link
Collaborator

Test stage Build on Leap 15 with Intel-C and TARGET_PREFIX completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-2402/5/execution/node/202/log

@daosbuild1
Copy link
Collaborator

Test stage Build on CentOS 7 completed with status FAILURE. https://build.hpdd.intel.com//job/daos-stack/job/daos/view/change-requests/job/PR-2402/5/execution/node/259/log

@daosbuild1
Copy link
Collaborator

@daosbuild1
Copy link
Collaborator

Fixed several edge cases related to new extended layout sometimes
returned during the test.

 - There was a problem with the new extended layout being returned
   during the IO test. This was because the IO test was triggering
   reintegration by making a call to pool_add_target which had not triggered
   reintegration in the past but was now causing a race between the rebuild
   process and the IO test.

- It was also possible that while choosing the leader during placement,
  the newly extended shard would be chosen as the leader when it
  shouldn't have been. Now any shard which is not yet reintegrated will
  be skipped as the leader.

Signed-off-by: Peter Fetros <[email protected]>
@daosbuild1 daosbuild1 dismissed their stale review June 4, 2020 01:31

Updated patch

@PetFet
Copy link
Contributor Author

PetFet commented Jun 4, 2020

OID Test Failure and Some Intermittent Rebuild Failures. These one's I do think are intermittent failures that are affecting everyone.

@PetFet
Copy link
Contributor Author

PetFet commented Jun 5, 2020

Previously failed on rebuild Test 22, This can be found here https://jira.hpdd.intel.com/browse/DAOS-3952. otherwise no failures on run 18.

@daosbuild1
Copy link
Collaborator

@@ -139,9 +139,6 @@ obj_shard_open(struct dc_object *obj, unsigned int shard, unsigned int map_ver,
D_GOTO(unlock, rc = -DER_NONEXIST);
}

/* XXX could be otherwise for some object classes? */
D_ASSERT(obj_shard->do_shard == shard);
Copy link
Contributor

Choose a reason for hiding this comment

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

In what use case they are not equal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this patches scenario.

When performing online features (reintegration/drain/etc.) we need to return an extended layout containing the shards we're moving data to, that way when we perform concurrent I/O the new writes also go to the targets we're reintegrating.

In this case we need a way keep track of which shards are in the extended layout by giving them the same shard number.

For example

[T1 T2 T3] <- original layout.
[S1 S2 S3] <- shard ordering

[T4 T2 T3] <- new layout after failure and rebuild.
[S1 S2 S3]

[T4 T2 T3 T1] <- for online reintegration, we need to write to everything because of concurrent I/O.
[S1 S2 S3 S1] <- Reintegrating target being reintegrated for shard 1

[T1 T2 T3] <- reintegration complete.
[S1 S2 S3]

for (i = 0; i < *spare_cnt; i++)
D_PRINT("shard %d, spare target rank %d\n",
shard_ids[i], spare_tgt_ranks[i]);

Copy link
Contributor

Choose a reason for hiding this comment

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

that'll leave an empty for loop?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That was a mistake, thanks for catching it!

@PetFet PetFet requested a review from NiuYawei June 9, 2020 21:55
int rc = 0;

grp_map = NULL;
grp_count = NULL;
Copy link
Contributor

Choose a reason for hiding this comment

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

could initialize when declaring them

goto out;

D_ALLOC_ARRAY(grp_map, (layout->ol_nr / 8) + 1);
D_ALLOC_ARRAY(grp_count, layout->ol_grp_nr);
Copy link
Contributor

Choose a reason for hiding this comment

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

indeed

grp_count = NULL;

/* Empty list, no extension needed */
if (extended_list == extended_list->next || layout->ol_grp_size == 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

d_list_empty(extended_list)

max_fail_grp = 0;

current = extended_list->next;
while (current != extended_list) {
Copy link
Contributor

Choose a reason for hiding this comment

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

d_list_for_each_safe?

if (max_fail_grp < grp_count[grp])
max_fail_grp = grp_count[grp];
} else
d_list_del_init(&f_shard->fs_list);
Copy link
Contributor

Choose a reason for hiding this comment

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

style: use braces for all code blocks if any of code blocks of "if{}else" require braces

new_group_size = layout->ol_grp_size + max_fail_grp;
D_ALLOC_ARRAY(new_shards, new_group_size * layout->ol_grp_nr);
if (new_shards == NULL)
return -DER_NOMEM;
Copy link
Contributor

Choose a reason for hiding this comment

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

indeed

if (extended_list == extended_list->next || layout->ol_grp_size == 1)
goto out;

D_ALLOC_ARRAY(grp_map, (layout->ol_nr / 8) + 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

no big deal, but we normally use this: (layout->ol_nr + 1)/8, otherwise you got two bytes if nr==8.


current = extended_list->next;
while (current != extended_list) {
Copy link
Contributor

Choose a reason for hiding this comment

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

d_list_for_each_entry?

if (new_shards == NULL)
return -DER_NOMEM;

while (k < layout->ol_nr) {
Copy link
Contributor

Choose a reason for hiding this comment

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

easier to understand in this way? " for (i = k = 0; k < layout->ol_nr;)"
if we need to set initial value of loop, I think it's cleaner to just use "for" statement

@daosbuild1
Copy link
Collaborator

Test stage Functional completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-2402/22/display/redirect

@daosbuild1
Copy link
Collaborator

Test stage Functional_Hardware_Large completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-2402/22/display/redirect

@daosbuild1
Copy link
Collaborator

Test stage Functional completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-2402/23/display/redirect

@daosbuild1
Copy link
Collaborator

Test stage Functional_Hardware_Medium completed with status FAILURE. https://build.hpdd.intel.com/job/daos-stack/job/daos/job/PR-2402/23/display/redirect

@PetFet
Copy link
Contributor Author

PetFet commented Jun 16, 2020

Currently failing Rebuild Test #3.
The client log reports this error:

06/15-22:21:58.06 wolf-52 DAOS[32257/32257] object INFO src/object/obj_verify.c:539 dc_obj_verify_cmp() 1152921590623633466.31 (reps 3, inconsistent) shard 0 has rec type 0, but shard 1 has rec type 4.

06/15-22:21:58.06 wolf-52 DAOS[32257/32257] object ERR  src/object/obj_verify.c:710 dc_obj_verify_rdg() Failed to verify cmp: DER_MISMATCH(-1031)

Di is working on a patch for this issue (DAOS-4623)

@daosbuild1
Copy link
Collaborator

Test stage Functional_Hardware_Large completed with status UNSTABLE. https://build.hpdd.intel.com/job/daos-stack/job/daos//view/change-requests/job/PR-2402/26/testReport/(root)/

@gnailzenh gnailzenh merged commit 28611b4 into master Jun 17, 2020
@dmiter dmiter deleted the DAOS-4441 branch November 3, 2020 21:56
SABollinger pushed a commit that referenced this pull request Nov 11, 2020
* DAOS-4441 Placement: Modify Placement for OS Reintegration

Modified the placement API functionality so that now when
a reintegration operation is ongoing it will temporarily extend
the layout to include the reintegrating targets.

Fixed several edge cases related to new extended layout sometimes
returned during the test.

 - There was a problem with the new extended layout being returned
   during the IO test. This was because the IO test was triggering
   reintegration by making a call to pool_add_target which had not triggered
   reintegration in the past but was now causing a race between the rebuild
   process and the IO test.

- It was also possible that while choosing the leader during placement,
  the newly extended shard would be chosen as the leader when it
  shouldn't have been. Now any shard which is not yet reintegrated will
  be skipped as the leader.

Signed-off-by: Peter Fetros <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants