Skip to content

Conversation

FxKu
Copy link
Member

@FxKu FxKu commented Apr 14, 2022

Only minor adjustments to improve syncing volumes when resize mode is ebs.

return nil
}
c.logger.Infof("starting EBS gp2 to gp3 migration")

Copy link
Member Author

Choose a reason for hiding this comment

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

c.OpConfig.EnableEBSGp3Migration is already checked before calling executeEBSMigration. The log line is quite confusing because the function is executed every sync and at this point it's not decided yet, that a migration is actually happening.

}
c.logger.Debugf("found %d volumes, size of known volumes %d", len(pvs), len(c.EBSVolumes))
if len(pvs) == 0 {
c.EBSVolumes = make(map[string]volumes.VolumeProperties)
Copy link
Member Author

Choose a reason for hiding this comment

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

reset c.EBSVolumes when there are no persistent volume claims

}

if len(currentVolumes) != len(c.EBSVolumes) {
if len(currentVolumes) != len(c.EBSVolumes) && len(c.EBSVolumes) > 0 {
Copy link
Member Author

Choose a reason for hiding this comment

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

On first run c.EBSVolumes will be empty at this point. We already logged the size of known volumes above. Therefore, we should print this debug message only on subsequent sync runs and only if there is a difference.

@FxKu FxKu added this to the 1.8 milestone Apr 19, 2022
@sdudoladov
Copy link
Member

👍

1 similar comment
@FxKu
Copy link
Member Author

FxKu commented Apr 20, 2022

👍

@FxKu FxKu merged commit 532772c into master Apr 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants