Re: PHP not updated on some machines

2022-10-06 Thread Mike Fischer


> Am 06.10.2022 um 21:30 schrieb Stuart Henderson :
> 
> In cases where the CDN or mirror does appear to be all in sync then
> we might be looking at a problem with pkg_add or with the packages
> themselves. For either of those cases it would help to collect
> output from "pkg_add -u -vv" under script(1) and reporting.

While doing this I noticed that the the issue had resolved itself. Same on two 
other machines this was happening on.

So I guess this was probably some sort of cache issue on the CDN.


Thanks!
Mike



Re: PHP not updated on some machines

2022-10-06 Thread Stuart Henderson
On 2022-10-06, Mike Fischer  wrote:
> I have some local VMs running OpenBSD 7.1 stable, amd64 as well as some 
> remote VMs running the same.
>
> When I did pkg_add -u today two of my three local machines updated PHP to 
> versions 7.4.32, 8.0.24 and 8.1.11 as expected. However the remote machines 
> and a very basic local machine, while seeing the exact same quirks version, 
> did not update PHP.
> quirks-5.5 signed on 2022-10-06T09:54:45Z
>
> pkg_info -d php-7.4.32, etc. shows correct info on the affected machines 
> though.
>
> I have never encountered such strange behavior before.
>
>
> I kind of suspect some weird cache issue but I don’t understand the 
> underpinnings of pkg_add enough to figure this out. Does pkg_add use some 
> sort of local cache that I could clear?
>
> Any clues on what could cause this and how to resolve this issue?
>
> All machines have:
> # cat /etc/installurl 
>   
>   
> https://cdn.openbsd.org/pub/OpenBSD

This may go to different CDN nodes depending on the network location
of the various machines. And they may have different things in their
caches. In particular HTTP objects which are fetched more frequently,
like the directory listing, are highly likely to be cached.

This causes a problem if new files have been added; if the cached
listing does not include some newly added files, pkg_add won't know
how to find thems unless you try requesting it directly by full name
(which bypasses fetching the index).

If you suspect this, HTTP headers give a bit more detail, including
the cdn node/s involved and whether the object was cached:

$ curl -I https://cdn.openbsd.org/pub/OpenBSD/7.1/packages-stable/amd64/
HTTP/2 200 
content-type: text/html
last-modified: Thu, 06 Oct 2022 09:54:58 GMT
server: OpenBSD httpd
backend-name: 5GnZ0LBU5CzDw9NCjFbkjI--F_fanout_openbsd_org
via: 1.1 varnish, 1.1 varnish
accept-ranges: bytes
date: Thu, 06 Oct 2022 19:14:23 GMT
age: 141
x-served-by: cache-yyz4581-YYZ, cache-lcy19229-LCY
x-cache: HIT, HIT
x-cache-hits: 1, 1
x-timer: S1665083664.644890,VS0,VE1
content-length: 184901

Since the PHP 7.4.32 package was not available in 7.1-stable until
about 10 hours ago I think this is by far the most likely explanation.

If that happens then you might like to try fetching from one of the
standard mirrors listed in https://www.openbsd.org/ftp.html rather than
a CDN. But check the directory listing as that may not have updated
yet either. In the case of standard mirrors the directory listing
would be generated on the mirror itself from the files it has synced
rather than as a separately cacheable object.

In cases where the CDN or mirror does appear to be all in sync then
we might be looking at a problem with pkg_add or with the packages
themselves. For either of those cases it would help to collect
output from "pkg_add -u -vv" under script(1) and reporting.

> Manually trying to install/update PHP like this worked:
> # pkg_add php-7.4.32 
> quirks-5.5 signed on 2022-10-06T09:54:45Z
> php-7.4.30->7.4.32: ok

This fits the "cdn node had an old cached index" hypothesis.

> Read shared items: ok
> New and changed readme(s):
>   /usr/local/share/doc/pkg-readmes/php-7.4
> --- -php-7.4.30 ---
> You should also run rm -f /etc/php-7.4.sample/*
> You should also run rm -f /etc/php-fpm.d/*
> # php-7.4 -v
> PHP 7.4.32 (cli) (built: Oct  5 2022 08:55:36) ( NTS )
> Copyright (c) The PHP Group
> Zend Engine v3.4.0, Copyright (c) Zend Technologies
> # 
>
> So why would pkg_add -u fail where pkg_add php-7.4.32 works? And why only on 
> some of the machines?
>
> Thanks
> Mike
>
>


-- 
Please keep replies on the mailing list.



PHP not updated on some machines

2022-10-06 Thread Mike Fischer
I have some local VMs running OpenBSD 7.1 stable, amd64 as well as some remote 
VMs running the same.

When I did pkg_add -u today two of my three local machines updated PHP to 
versions 7.4.32, 8.0.24 and 8.1.11 as expected. However the remote machines and 
a very basic local machine, while seeing the exact same quirks version, did not 
update PHP.
quirks-5.5 signed on 2022-10-06T09:54:45Z

pkg_info -d php-7.4.32, etc. shows correct info on the affected machines though.

I have never encountered such strange behavior before.


I kind of suspect some weird cache issue but I don’t understand the 
underpinnings of pkg_add enough to figure this out. Does pkg_add use some sort 
of local cache that I could clear?

Any clues on what could cause this and how to resolve this issue?

All machines have:
# cat /etc/installurl   

  
https://cdn.openbsd.org/pub/OpenBSD
# 

Manually trying to install/update PHP like this worked:
# pkg_add php-7.4.32 
quirks-5.5 signed on 2022-10-06T09:54:45Z
php-7.4.30->7.4.32: ok
Read shared items: ok
New and changed readme(s):
/usr/local/share/doc/pkg-readmes/php-7.4
--- -php-7.4.30 ---
You should also run rm -f /etc/php-7.4.sample/*
You should also run rm -f /etc/php-fpm.d/*
# php-7.4 -v
PHP 7.4.32 (cli) (built: Oct  5 2022 08:55:36) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
# 

So why would pkg_add -u fail where pkg_add php-7.4.32 works? And why only on 
some of the machines?

Thanks
Mike