• Kubernetes Submit Queue's avatar
    Merge pull request #57800 from filbranden/logpath1 · 7e65afd2
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 58221, 58529, 57800). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Skip log path tests when they are expected to fail.
    
    **What this PR does / why we need it**:
    
    The log path test is not expected to pass unless the Docker is using the JSON logging driver, since that's what the log path is trying to find. When Docker is using the journald logging driver, there will be no JSON files in the logging directories for it to find.
    
    Furthermore, when SELinux support is enabled in the Docker daemon, SELinux will prevent containers to access files owned by other containers (which is what this test is trying to accomplish), so skip this test in case SELinux support is enabled too.
    
    @yguo0905 
    
    Tested:
    
    - With Docker daemon started using --log-driver=journald:
    ```
        S [SKIPPING] in Spec Setup (BeforeEach) [8.193 seconds]
        [k8s.io] ContainerLogPath
          Pod with a container
            printed log to stdout
              should print log to correct log path [BeforeEach]
              Jan  3 18:33:44.869: Skipping because Docker daemon is using a logging driver other than "json-file": journald
    ```
    - With Docker daemon started using --selinux-enabled:
    ```
        S [SKIPPING] in Spec Setup (BeforeEach) [8.488 seconds]
        [k8s.io] ContainerLogPath
          Pod with a container
            printed log to stdout
              should print log to correct log path [BeforeEach]
              Jan  3 18:35:58.909: Skipping because Docker daemon is running with SELinux support enabled
    ```
    - With Docker started using JSON logging driver and with SELinux disabled:
    ```
        • [SLOW TEST:16.352 seconds]  (passed)
        [k8s.io] ContainerLogPath
          Pod with a container
            printed log to stdout
              should print log to correct log path
        Ran 1 of 256 Specs in 36.428 seconds
        SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 255 Skipped
    ```
    
    
    **Release note**:
    
    ```release-note NONE```
    7e65afd2
Name
Last commit
Last update
.github Loading commit data...
Godeps Loading commit data...
api Loading commit data...
build Loading commit data...
cluster Loading commit data...
cmd Loading commit data...
docs Loading commit data...
examples Loading commit data...
hack Loading commit data...
logo Loading commit data...
pkg Loading commit data...
plugin Loading commit data...
staging Loading commit data...
test Loading commit data...
third_party Loading commit data...
translations Loading commit data...
vendor Loading commit data...
.bazelrc Loading commit data...
.generated_files Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.kazelcfg.json Loading commit data...
BUILD.bazel Loading commit data...
CHANGELOG-1.10.md Loading commit data...
CHANGELOG-1.2.md Loading commit data...
CHANGELOG-1.3.md Loading commit data...
CHANGELOG-1.4.md Loading commit data...
CHANGELOG-1.5.md Loading commit data...
CHANGELOG-1.6.md Loading commit data...
CHANGELOG-1.7.md Loading commit data...
CHANGELOG-1.8.md Loading commit data...
CHANGELOG-1.9.md Loading commit data...
CHANGELOG.md Loading commit data...
CONTRIBUTING.md Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
Makefile.generated_files Loading commit data...
OWNERS Loading commit data...
OWNERS_ALIASES Loading commit data...
README.md Loading commit data...
SUPPORT.md Loading commit data...
WORKSPACE Loading commit data...
code-of-conduct.md Loading commit data...
labels.yaml Loading commit data...