Change:
<!-- Please only use this template for submitting reports about failing tests in Kubernetes CI jobs --Which jobs are failing: gce/gke multizone/regional jobs Which test(s) are failing: Only PD tests Since when has it been failing: Around 12/21 with the 16:49 run Testgrid link: https://k8s- Reason for failure: TBD Anything else we need to know: <!-- DO NOT EDIT BELOW THIS LINE --/kind failing-test
The runs started flaking after merged. cc Here's one failing run: Pod pod-subpath-test-gcepd-dynamicpv-pfsm failed to schedule because of conflicting node selectors: We shouldn't need to set the node selector for PD tests using PVs.
The PR broke the subpath test because the modification to the config struct embedded in the driver info now persists across tests: A quick fix would be to reset that field in CreateDriver. The long-term fix is the change discussed in My preference is to do the quick fix now, then either merge or close PRs in this order: (needs a decision about logging of tests that aren't getting defined, see ) a future PR for What I'd like to avoid is having to rebase PR on top of the long-term solution for issue - that'll be lots of code conflicts.
/assign PR is here: PR

Discussion:
for _, initDriver := range csiTestDrivers { curDriver := initDriver(config) <ins> curConfig := curDriver.GetDriverInfo().Config </ins> Context(testsuites.GetDriverNameWithFeatureTags(curDriver), func() { <del> driver := curDriver </del> BeforeEach(func() { <ins> // Reset config. The driver might have modified its copy // in a previous test. curDriver.GetDriverInfo().Config = curConfig </ins> // setupDriver <del> driver.CreateDriver() </del> <ins> curDriver.CreateDriver() </ins> }) AfterEach(func() { // Cleanup driver <del> driver.CleanupDriver() </del> <ins> curDriver.CleanupDriver() </ins> }) <del> testsuites.RunTestSuite(f, driver, csiTestSuites, csiTunePattern) </del> <ins> testsuites.RunTestSuite(f, curDriver, csiTestSuites, csiTunePattern) </ins> }) }

ns := f.Namespace n.externalPluginName = fmt.Sprintf("example.com/nfs-%s", ns.Name) <del> // Reset config. It might have been modified by a previous CreateVolume call. n.driverInfo.Config.ServerConfig = nil </del> // TODO(mkimuram): cluster-admin gives too much right but system:persistent-volume-provisioner // is not enough. We should create new clusterrole for testing. framework.BindClusterRole(cs.RbacV1beta1(), "cluster-admin", ns.Name,

} func (g *glusterFSDriver) CreateDriver() { <del> // Reset config. It might have been modified by a previous CreateVolume call. g.driverInfo.Config.ServerConfig = nil </del> } func (g *glusterFSDriver) CleanupDriver() {

} func (i *iSCSIDriver) CreateDriver() { <del> // Reset config. It might have been modified by a previous CreateVolume call. i.driverInfo.Config.ServerConfig = nil </del> } func (i *iSCSIDriver) CleanupDriver() {

} func (r *rbdDriver) CreateDriver() { <del> // Reset config. It might have been modified by a previous CreateVolume call. r.driverInfo.Config.ServerConfig = nil </del> } func (r *rbdDriver) CleanupDriver() {

} func (c *cephFSDriver) CreateDriver() { <del> // Reset config. It might have been modified by a previous CreateVolume call. c.driverInfo.Config.ServerConfig = nil </del> } func (c *cephFSDriver) CleanupDriver() {

for _, initDriver := range testDrivers { curDriver := initDriver(config) <ins> curConfig := curDriver.GetDriverInfo().Config </ins> Context(testsuites.GetDriverNameWithFeatureTags(curDriver), func() { <del> driver := curDriver </del> BeforeEach(func() { <ins> // Reset config. The driver might have modified its copy // in a previous test. curDriver.GetDriverInfo().Config = curConfig </ins> // setupDriver <del> driver.CreateDriver() </del> <ins> curDriver.CreateDriver() </ins> }) AfterEach(func() { // Cleanup driver <del> driver.CleanupDriver() </del> <ins> curDriver.CleanupDriver() </ins> }) <del> testsuites.RunTestSuite(f, driver, testSuites, intreeTunePattern) </del> <ins> testsuites.RunTestSuite(f, curDriver, testSuites, intreeTunePattern) </ins> }) } })