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

Execute sync before taking the snapshot #107312

Merged

Conversation

mauriciopoppe
Copy link
Member

What type of PR is this?

/kind bug
/kind failing-test
/kind flake

What this PR does / why we need it:

From the last CI runs of PD CSI Driver it looks like sometimes data is not flushed to disk, after the echo command is execute we flush the data with the sync command.

Does this PR introduce a user-facing change?

NONE

/cc @jingxu97

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. kind/flake Categorizes issue or PR as related to a flaky test. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 4, 2022
@k8s-ci-robot
Copy link
Contributor

@mauriciopoppe: This issue is currently awaiting triage.

If a SIG or subproject determines this is a relevant issue, they will accept it by applying the triage/accepted label and provide further guidance.

The triage/accepted label can be added by org members by writing /triage accepted in a comment.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. area/test sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Jan 4, 2022
@mauriciopoppe
Copy link
Member Author

/retest

@mauriciopoppe
Copy link
Member Author

/hold

Sync isn't working in the agnhost image:

PS C:\> echo 'hi' > hi; sync
sync : The term 'sync' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:17
+ echo 'hi' > hi; sync
+                 ~~~~
+ CategoryInfo          : ObjectNotFound: (sync:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 4, 2022
@mauriciopoppe
Copy link
Member Author

/hold cancel

I tried with this manifest and sync is available here, it was a problem on my end.

# A multi-arch Windows container that runs an HTTP server on port
# 9376 that serves the container's hostname.
#   curl -s http://<pod_ip>:9376
apiVersion: apps/v1
kind: Deployment
metadata:
  name: windows-agnhost
  labels:
    app: agnhost
spec:
  replicas: 1
  selector:
    matchLabels:
      app: agnhost
  template:
    metadata:
      labels:
        app: agnhost
    spec:
      containers:
      - name: agnhost
        image: k8s.gcr.io/e2e-test-images/agnhost:2.33
        args:
        - serve-hostname
      nodeSelector:
        kubernetes.io/os: windows
      tolerations:
      - effect: NoSchedule
        key: node.kubernetes.io/os
        operator: Equal
        value: windows

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jan 4, 2022
@@ -422,7 +422,7 @@ func (s *snapshottableTestSuite) DefineTests(driver storageframework.TestDriver,

ginkgo.By("modifying the data in the source PVC")

command := fmt.Sprintf("echo '%s' > %s", modifiedMntTestData, datapath)
command := fmt.Sprintf("echo '%s' > %s; sync", modifiedMntTestData, datapath)
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch, added sync there too

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 5, 2022
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 5, 2022
@mauriciopoppe
Copy link
Member Author

/test pull-kubernetes-e2e-gce-storage-slow

@jingxu97
Copy link
Contributor

jingxu97 commented Jan 5, 2022

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 5, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jingxu97, mauriciopoppe

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 5, 2022
@k8s-ci-robot k8s-ci-robot merged commit 691e89a into kubernetes:master Jan 5, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.24 milestone Jan 5, 2022
@gnufied
Copy link
Member

gnufied commented Jan 14, 2022

@mauriciopoppe can you cherry-pick this to 1.23 also btw? It looks like these tests can fail there too.

k8s-ci-robot added a commit that referenced this pull request Jan 23, 2022
…f-#107312-upstream-release-1.23

Automated cherry pick of #107312: Execute sync before taking the snapshot
k8s-ci-robot added a commit that referenced this pull request Jan 27, 2022
…f-#107312-upstream-release-1.21

Automated cherry pick of #107312: Execute sync before taking the snapshot
k8s-ci-robot added a commit that referenced this pull request Jan 27, 2022
…f-#107312-upstream-release-1.22

Automated cherry pick of #107312: Execute sync before taking the snapshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/e2e-test-framework Issues or PRs related to refactoring the kubernetes e2e test framework area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. kind/failing-test Categorizes issue or PR as related to a consistently or frequently failing test. kind/flake Categorizes issue or PR as related to a flaky test. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/storage Categorizes an issue or PR as relevant to SIG Storage. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants