delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/06/14/13:04:42

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B45C7395C415
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1592154238;
bh=hFSDISn/rHo9GEQhQiEFdyo2aEu+KQ7nq0ZXSdd1CxY=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=sQIVhcO0aRbon1wjgFmg0C6aAL6xP4L7k2Rquml3o3eaF+hwBRpToZsEgfyrRJPpU
GSgxtALwISIr91hgzbSZnlKq3Rf68nSm+NCsbR3rgXgqIx0JGEk/SdZLNAlirq1353
1Gc3RF29VOcNodzPJokODubuXRInE9qKPAnXaQq0=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1388D388B003
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:subject:to:cc:references:from:message-id:date
:user-agent:mime-version:in-reply-to:content-language
:content-transfer-encoding;
bh=FYY6GdsSHFLotA7GnUrNqU7EqjHLpToxSp2T0uUPGJ4=;
b=rFzELLLfXNFeJ1c37ayqg8FbRSXbZ1OHZotnrG5qkhRLki/+aQOfejY1ZuZWxpVhdF
Ldz2sGAz1FKLgaR74QhfIWVm1bv/Q6hs9axsyJdtl/yygH9/9FW8M0x9OlCuxgA0G9dI
vLbs/U9jZkE9rKNJnCG4+D4lGrzVP264gxZ+V1pQHrJfAkVC1P88y2mUUlNobAGgCvK8
01zdPPpM3N3tAIKPA7GwnF7tKX2FgjIT/ojxg/4IZucRmyULDeFPQnJ8x49NuoknyFQ5
WGU2wyKvm3jtqQC3UdBJNQp/b9lK3I759eiJHeWmQ/O3/JX0X+gEbQpg9e98TMSKCwre
QjwQ==
X-Gm-Message-State: AOAM532wLWPTrlMdK2GaBXwGm2qsunaHXKIqj2G91AbcAf0NliZ08Tbt
Uny5EpSYiKG0swfeod4hp1LhhXcG
X-Google-Smtp-Source: ABdhPJxxd1iOCYo5lrpkLR3ZZUAOnw1/aZiqVWBmHs6BkCd1Ozp5Vs0v5wnLCDdCX4Fk5RzrK4L9bQ==
X-Received: by 2002:a1c:808d:: with SMTP id b135mr8905333wmd.94.1592154234876;
Sun, 14 Jun 2020 10:03:54 -0700 (PDT)
Subject: Re: "kubectl exec" in Cygwin gets "Upgrade request required", but not
in cmd shell
To: David Karr <davidmichaelkarr AT gmail DOT com>
References: <CAA5t8VqpU2KiQ_Kk5czjLzeCDzf21Gb2iBLu25xB43ZhpfmaPQ AT mail DOT gmail DOT com>
<b68e371b-4e3d-3ab3-9a0e-2461697d814d AT gmail DOT com>
<CAA5t8Vpym95FDhvanJSNd910kWssJqK46ZzmF2jckQbY_7YxOw AT mail DOT gmail DOT com>
<f224a4a9-ea7d-e22c-0285-19d09ebd572f AT gmail DOT com>
<CAA5t8Vpanxxop9THkbod115y_Xd2Q2QvYDXvBYOA7N9BqQw-Bw AT mail DOT gmail DOT com>
Message-ID: <04fd4a0b-96a7-cdfe-e74f-bb146b283ce8@gmail.com>
Date: Sun, 14 Jun 2020 19:03:53 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.9.0
MIME-Version: 1.0
In-Reply-To: <CAA5t8Vpanxxop9THkbod115y_Xd2Q2QvYDXvBYOA7N9BqQw-Bw@mail.gmail.com>
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Marco Atzeri via Cygwin <cygwin AT cygwin DOT com>
Reply-To: Marco Atzeri <marco DOT atzeri AT gmail DOT com>
Cc: The Cygwin Mailing List <cygwin AT cygwin DOT com>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 05EH4Nhw018299

On 14.06.2020 17:38, David Karr wrote:
> 
> On Sun, Jun 14, 2020 at 2:25 AM Marco Atzeri wrote:
> 
>     On 14.06.2020 08:12, David Karr wrote:
>      >
>      >
>      > On Sat, Jun 13, 2020 at 10:31 PM Marco Atzeri via Cygwin wrote:
>      >
>      >     On 13.06.2020 20:53, David Karr via Cygwin wrote:
>      >      > I've been using kubectl in Cygwin on Windows 10 for quite
>     a while, to
>      >      > communicate to our in-house k8s clusters. I often use "kubectl
>      >     exec" to
>      >      > open a shell in a container or directly execute a shell
>     command.
>      >     This has
>      >      > worked perfectly fine for a long time.
>      >      >
>      >      > A couple of days ago, I discovered that all of these attempts
>      >     were failing
>      >      > with "Upgrade request required".  I hadn't upgraded kubectl or
>      >     Cygwin in
>      >      > quite a while. I doubt our clusters had a k8s upgrade, but
>     it's
>      >     entirely
>      >      > possible.
>      >      >
>      >      > A colleague of mine has a very similar desktop configuration
>      >     (Windows 10,
>      >      > Cygwin), and he's not seeing this symptom.
>      >      >
>      >      > I noticed that when I ran "kubectl exec" with max
>     verbosity, it
>      >     shows the
>      >      > resulting "curl" command that it runs. I tried that resulting
>      >     command, and
>      >      > it results in the same response. I then tried updating my
>     Cygwin
>      >     tools and
>      >      > retesting, no change.
>      >      >
>      >      > I then took the entire resulting "kubectl exec" command
>     line and
>      >     ran it in
>      >      > a "cmd" shell.  No problem at all.  No error.
>      >      >
>      >      > I know I haven't provided much useful information yet. I
>     wanted
>      >     to get an
>      >      > initial response before I started providing those
>     diagnostics. Is
>      >     there a
>      >      > clear issue here that I'm not aware of?
>      >      > --
>      >
>      >     from where is kubectl coming from ?
>      >
>      >     In cygwin I found only a kubectl.py in the ansible package
>      >
>      >
>      > It's from here:
>      >
>     https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl-on-windows
> 
>      > .
> 
>     so it is NOT a cygwin program.
> 
>     If the warning is coming about curl, it is likely
>     that using from cygwin you are using the cygwin curl
>     and from CMD the windows one
> 
> 
>     $ which -a curl
>     /usr/bin/curl
>     /cygdrive/c/WINDOWS/system32/curl

>     the support Forum https://discuss.kubernetes.io/
>     is probably the most indicate place for guidance
> 
>     Regards
>     Marco
> 
> 
> I thought it was obvious that it was not working because it was calling 
> the Cygwin curl. I wouldn't have posted here if that wasn't obvious to me.

Obvious not so much to me, evidently ;-)

> And since I'm well aware of the k8s community, I already posted 
> questions about this in the appropriate place, before I posted here.
> 
> What I was hoping to get here was some indication or thoughts on why a 
> process using Windows curl doesn't have a problem, but does have a 
> problem when using Cygwin Curl. This isn't likely something that Cygwin 
> curl is doing "wrong", it's just that it's doing something different.

the Cygwin curl was changed last time on 18 Sep 2019.
So it is not something directly depending from the package, maybe from
the dependencing libraries.

Comparing the help and version outputs the cygwin one is coming from a 
more recent version and has more features than the windows one ;
the only major difference I see is that the windows version
produces output with CRLF termination.

It is possible that kubectl is doing a version check and it misleading
reports a different version as older one.

> If it matters, the following is an elided version of the resulting curl 
> command:
> 
>      curl -k -v -XPOST  -H "User-Agent: kubectl.exe/v1.18.0 
> (windows/amd64) kubernetes/9e99141" -H "Authorization: Bearer ..." -H 
> "X-Stream-Protocol-Version: v4.channel.k8s.io 
> <http://v4.channel.k8s.io>" -H "X-Stream-Protocol-Version: 
> v3.channel.k8s.io <http://v3.channel.k8s.io>" -H 
> "X-Stream-Protocol-Version: v2.channel.k8s.io 
> <http://v2.channel.k8s.io>" -H "X-Stream-Protocol-Version: 
> channel.k8s.io <http://channel.k8s.io>" 
> 'https://.../api/v1/namespaces/.../pods/.../exec?command=%2Fbin%2Fls&container=...&stderr=true&stdin=true&stdout=true'
> 
> I can't tell from the logging what request body it sent. It's possible 
> it didn't send any.

all the options used are basic and present in both versions.
May be CRLF vs LF is present also on POST method

Regards
Marco
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019