Re: varnishadm exit code 200

2021-10-03 Thread Dridi Boukelmoune
On Sat, Oct 2, 2021 at 10:24 PM Martynas Jusevičius
 wrote:
>
> Actually it does not seem to be the exit code. I tried checking and it
> looks like the exit code is 0:
>
> root@dc17c642d39a:/etc/varnish# varnishadm "ban req.url ~ /"
> 200
>
> root@dc17c642d39a:/etc/varnish# test $? -eq 0 || echo "Error"
> root@dc17c642d39a:/etc/varnish#
>
> So where is that "200" coming from?

You shouldn't see a 200, except for this bug fixed in 7.0:

https://github.com/varnishcache/varnish-cache/issues/3687

What version of Varnish are you running?

Dridi
___
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


Re: varnishadm exit code 200

2021-10-02 Thread Guillaume Quintard
Oh, 4.x is ancient, glad you made the upgrade!

On Sat, Oct 2, 2021, 15:54 Martynas Jusevičius 
wrote:

> I thought that was a non-zero exit code but it's not :)
>
> We just noticed a change -- in the earlier version we used (not sure
> which now, I think 4.x) there was no output from varnishadm.
>
> We'll just send the 200 to /dev/null then.
>
> On Sun, Oct 3, 2021 at 12:39 AM Guillaume Quintard
>  wrote:
> >
> > 200 means the command passed to varnish, via varnishadm, succeeded. What
> makes you think it failed?
> >
> > On Sat, Oct 2, 2021, 15:24 Martynas Jusevičius 
> wrote:
> >>
> >> Actually it does not seem to be the exit code. I tried checking and it
> >> looks like the exit code is 0:
> >>
> >> root@dc17c642d39a:/etc/varnish# varnishadm "ban req.url ~ /"
> >> 200
> >>
> >> root@dc17c642d39a:/etc/varnish# test $? -eq 0 || echo "Error"
> >> root@dc17c642d39a:/etc/varnish#
> >>
> >> So where is that "200" coming from?
> >>
> >> On Sun, Oct 3, 2021 at 12:14 AM Martynas Jusevičius
> >>  wrote:
> >> >
> >> > Hi,
> >> >
> >> > We recently switched to the varnish:latest container and based an
> >> > unprivileged image on it (entrypoint runs as USER varnish):
> >> > https://github.com/AtomGraph/varnish/blob/official-image/Dockerfile
> >> >
> >> > We noticed that our varnishadm commands started failing. More
> specifically:
> >> >
> >> > root@dc17c642d39a:/etc/varnish# varnishadm "ban req.url ~ /"
> >> > 200
> >> >
> >> > As I understand it's a 200 exit code, which means varnishadm failed:
> >> >
> https://varnish-cache.org/docs/5.1/reference/varnishadm.html#exit-status
> >> >
> >> > What does 200 mean exactly? I couldn't find any code list.
> >> > My guess is that this has to do with the unprivileged varnish user,
> >> > but I'm not sure what it takes to fix it.
> >> >
> >> >
> >> > Martynas
> >> ___
> >> varnish-misc mailing list
> >> varnish-misc@varnish-cache.org
> >> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
___
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


Re: varnishadm exit code 200

2021-10-02 Thread Martynas Jusevičius
I thought that was a non-zero exit code but it's not :)

We just noticed a change -- in the earlier version we used (not sure
which now, I think 4.x) there was no output from varnishadm.

We'll just send the 200 to /dev/null then.

On Sun, Oct 3, 2021 at 12:39 AM Guillaume Quintard
 wrote:
>
> 200 means the command passed to varnish, via varnishadm, succeeded. What 
> makes you think it failed?
>
> On Sat, Oct 2, 2021, 15:24 Martynas Jusevičius  wrote:
>>
>> Actually it does not seem to be the exit code. I tried checking and it
>> looks like the exit code is 0:
>>
>> root@dc17c642d39a:/etc/varnish# varnishadm "ban req.url ~ /"
>> 200
>>
>> root@dc17c642d39a:/etc/varnish# test $? -eq 0 || echo "Error"
>> root@dc17c642d39a:/etc/varnish#
>>
>> So where is that "200" coming from?
>>
>> On Sun, Oct 3, 2021 at 12:14 AM Martynas Jusevičius
>>  wrote:
>> >
>> > Hi,
>> >
>> > We recently switched to the varnish:latest container and based an
>> > unprivileged image on it (entrypoint runs as USER varnish):
>> > https://github.com/AtomGraph/varnish/blob/official-image/Dockerfile
>> >
>> > We noticed that our varnishadm commands started failing. More specifically:
>> >
>> > root@dc17c642d39a:/etc/varnish# varnishadm "ban req.url ~ /"
>> > 200
>> >
>> > As I understand it's a 200 exit code, which means varnishadm failed:
>> > https://varnish-cache.org/docs/5.1/reference/varnishadm.html#exit-status
>> >
>> > What does 200 mean exactly? I couldn't find any code list.
>> > My guess is that this has to do with the unprivileged varnish user,
>> > but I'm not sure what it takes to fix it.
>> >
>> >
>> > Martynas
>> ___
>> varnish-misc mailing list
>> varnish-misc@varnish-cache.org
>> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
___
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


Re: varnishadm exit code 200

2021-10-02 Thread Guillaume Quintard
200 means the command passed to varnish, via varnishadm, succeeded. What
makes you think it failed?

On Sat, Oct 2, 2021, 15:24 Martynas Jusevičius 
wrote:

> Actually it does not seem to be the exit code. I tried checking and it
> looks like the exit code is 0:
>
> root@dc17c642d39a:/etc/varnish# varnishadm "ban req.url ~ /"
> 200
>
> root@dc17c642d39a:/etc/varnish# test $? -eq 0 || echo "Error"
> root@dc17c642d39a:/etc/varnish#
>
> So where is that "200" coming from?
>
> On Sun, Oct 3, 2021 at 12:14 AM Martynas Jusevičius
>  wrote:
> >
> > Hi,
> >
> > We recently switched to the varnish:latest container and based an
> > unprivileged image on it (entrypoint runs as USER varnish):
> > https://github.com/AtomGraph/varnish/blob/official-image/Dockerfile
> >
> > We noticed that our varnishadm commands started failing. More
> specifically:
> >
> > root@dc17c642d39a:/etc/varnish# varnishadm "ban req.url ~ /"
> > 200
> >
> > As I understand it's a 200 exit code, which means varnishadm failed:
> > https://varnish-cache.org/docs/5.1/reference/varnishadm.html#exit-status
> >
> > What does 200 mean exactly? I couldn't find any code list.
> > My guess is that this has to do with the unprivileged varnish user,
> > but I'm not sure what it takes to fix it.
> >
> >
> > Martynas
> ___
> varnish-misc mailing list
> varnish-misc@varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
___
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


Re: varnishadm exit code 200

2021-10-02 Thread Martynas Jusevičius
Actually it does not seem to be the exit code. I tried checking and it
looks like the exit code is 0:

root@dc17c642d39a:/etc/varnish# varnishadm "ban req.url ~ /"
200

root@dc17c642d39a:/etc/varnish# test $? -eq 0 || echo "Error"
root@dc17c642d39a:/etc/varnish#

So where is that "200" coming from?

On Sun, Oct 3, 2021 at 12:14 AM Martynas Jusevičius
 wrote:
>
> Hi,
>
> We recently switched to the varnish:latest container and based an
> unprivileged image on it (entrypoint runs as USER varnish):
> https://github.com/AtomGraph/varnish/blob/official-image/Dockerfile
>
> We noticed that our varnishadm commands started failing. More specifically:
>
> root@dc17c642d39a:/etc/varnish# varnishadm "ban req.url ~ /"
> 200
>
> As I understand it's a 200 exit code, which means varnishadm failed:
> https://varnish-cache.org/docs/5.1/reference/varnishadm.html#exit-status
>
> What does 200 mean exactly? I couldn't find any code list.
> My guess is that this has to do with the unprivileged varnish user,
> but I'm not sure what it takes to fix it.
>
>
> Martynas
___
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


varnishadm exit code 200

2021-10-02 Thread Martynas Jusevičius
Hi,

We recently switched to the varnish:latest container and based an
unprivileged image on it (entrypoint runs as USER varnish):
https://github.com/AtomGraph/varnish/blob/official-image/Dockerfile

We noticed that our varnishadm commands started failing. More specifically:

root@dc17c642d39a:/etc/varnish# varnishadm "ban req.url ~ /"
200

As I understand it's a 200 exit code, which means varnishadm failed:
https://varnish-cache.org/docs/5.1/reference/varnishadm.html#exit-status

What does 200 mean exactly? I couldn't find any code list.
My guess is that this has to do with the unprivileged varnish user,
but I'm not sure what it takes to fix it.


Martynas
___
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc