Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-8085

Hybrid Overlay logfile is in use and cannot be deleted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 4.12.z
    • 4.13.0
    • Windows Containers
    • None
    • No
    • 0
    • WINC - Sprint 233
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None

      This is a clone of issue OCPBUGS-6611. The following is the description of the original issue:

      Description of problem:

      When upgrading a Windows node the following error is seen:
      {"level":"info","ts":"2023-01-24T11:56:51Z","logger":"wc 10.0.128.7","msg":"deconfiguring"}
      {"level":"info","ts":"2023-01-24T11:57:23Z","logger":"wc 10.0.128.7","msg":"deconfigured","service":"windows-instance-config-daemon"}
      {"level":"info","ts":"2023-01-24T11:57:28Z","logger":"wc 10.0.128.7","msg":"removing directories"}
      {"level":"error","ts":"2023-01-24T11:57:29Z","logger":"wc 10.0.128.7","msg":"error running","cmd":"powershell.exe -NonInteractive -ExecutionPolicy Bypass \"if(Test-Path C:\\var\\log) {Remove-Item -Recurse -Force C:\\var\\log}\"","out":"Remove-Item : Cannot remove
       item C:\\var\\log\\hybrid-overlay\\hybrid-overlay.log: The process cannot access the file \r\n'hybrid-overlay.log' because it is being used by another process.\r\nAt line:1 char:27\r\n+ if(Test-Path C:\\var\\log) {Remove-Item -Recurse -Force C:\\var\\log}\r\n+  
                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : WriteError: (hybrid-overlay.log:FileInfo) [Remove-Item], IOException\r\n    + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell.Commands.Remove
      ItemCommand\r\nRemove-Item : Cannot remove item C:\\var\\log\\hybrid-overlay: The directory is not empty.\r\nAt line:1 char:27\r\n+ if(Test-Path C:\\var\\log) {Remove-Item -Recurse -Force C:\\var\\log}\r\n+                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      ~~~~~~~~\r\n    + CategoryInfo          : WriteError: (hybrid-overlay:DirectoryInfo) [Remove-Item], IOException\r\n    + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell.Commands.RemoveItemCommand\r\nRemove-Item : Cannot remove item C:\\va
      r\\log: The directory is not empty.\r\nAt line:1 char:27\r\n+ if(Test-Path C:\\var\\log) {Remove-Item -Recurse -Force C:\\var\\log}\r\n+                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : WriteError: (C:\\var\\log:Di
      rectoryInfo) [Remove-Item], IOException\r\n    + FullyQualifiedErrorId : RemoveFileSystemItemIOError,Microsoft.PowerShell.Commands.RemoveItemCommand\r\n","error":"Process exited with status 1","stacktrace":"github.com/openshift/windows-machine-config-operator/pkg
      /windows.(*windows).removeDirectories\n\t/remote-source/build/windows-machine-config-operator/pkg/windows/windows.go:578\ngithub.com/openshift/windows-machine-config-operator/pkg/windows.(*windows).Deconfigure\n\t/remote-source/build/windows-machine-config-operat
      or/pkg/windows/windows.go:422\ngithub.com/openshift/windows-machine-config-operator/pkg/nodeconfig.(*nodeConfig).Deconfigure\n\t/remote-source/build/windows-machine-config-operator/pkg/nodeconfig/nodeconfig.go:514\ngithub.com/openshift/windows-machine-config-oper
      ator/controllers.(*instanceReconciler).ensureInstanceIsUpToDate\n\t/remote-source/build/windows-machine-config-operator/controllers/controllers.go:86\ngithub.com/openshift/windows-machine-config-operator/controllers.(*WindowsMachineReconciler).configureMachine\n\
      t/remote-source/build/windows-machine-config-operator/controllers/windowsmachine_controller.go:433\ngithub.com/openshift/windows-machine-config-operator/controllers.(*WindowsMachineReconciler).Reconcile\n\t/remote-source/build/windows-machine-config-operator/cont
      rollers/windowsmachine_controller.go:355\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile\n\t/remote-source/build/windows-machine-config-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:121\nsigs.
      k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler\n\t/remote-source/build/windows-machine-config-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:320\nsigs.k8s.io/controller-runtime/pkg/internal/c
      ontroller.(*Controller).processNextWorkItem\n\t/remote-source/build/windows-machine-config-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:273\nsigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
      \n\t/remote-source/build/windows-machine-config-operator/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:234"}
      

      Version-Release number of selected component (if applicable):

      
      

      How reproducible:

      
      

      Steps to Reproduce:

      1.
      2.
      3.
      

      Actual results:

      The hybrid overlay log is unable to be deleted as it is in use by another process, most likely hybrid overlay.
      

      Expected results:

      The hybrid overlay log is deleted.
      

      Additional info:

      
      

            rh-ee-mankulka Mansi Kulkarni
            openshift-crt-jira-prow OpenShift Prow Bot
            Aharon Rasouli Aharon Rasouli
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: