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

Fix bug where incorrect response is returned [carry 3845] #3901

Merged
merged 1 commit into from
Dec 6, 2022

Commits on Dec 6, 2022

  1. Fix bug where incorrect response is returned

    When server is unreachable and docker checkpoint (or any command that
    needs to check the server type) is run, incorrect error was returned.
    
    When checking if the daemon had the right OS, we compared the OSType
    from the clients ServerInfo(). In situations where the client cannot
    connect to the daemon, a "stub" Info is used for this, in which we
    assume the daemon has experimental enabled, and is running the latest
    API version.
    
    However, we cannot fill in the correct OSType, so this field is empty
    in this situation.
    
    This patch only compares the OSType if the field is non-empty, otherwise
    assumes the platform matches.
    
    before this:
    
        docker -H unix:///no/such/socket.sock checkpoint create test test
        docker checkpoint create is only supported on a Docker daemon running on linux, but the Docker daemon is running on
    
    with this patch:
    
        docker -H unix:///no/such/socket.sock checkpoint create test test
        Cannot connect to the Docker daemon at unix:///no/such/socket.sock. Is the docker daemon running?
    
    Co-authored-by: Adyanth Hosavalike <[email protected]>
    Signed-off-by: Sebastiaan van Stijn <[email protected]>
    adyanth authored and thaJeztah committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    20ba591 View commit details
    Browse the repository at this point in the history