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

pkg(1) does not deal well with a mirror that is unavailable #486

Open
jclulow opened this issue Jul 12, 2024 · 1 comment
Open

pkg(1) does not deal well with a mirror that is unavailable #486

jclulow opened this issue Jul 12, 2024 · 1 comment

Comments

@jclulow
Copy link
Contributor

jclulow commented Jul 12, 2024

The us-west mirror is apparently down right now, and pkg commands appear to get stuck trying to contact it:

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
ooce/server/nginx                        0/2          0/27      0.0/0.7      --

It appears the system will wait rather a long time for a connection timeout, and may keep trying even after the first few tries fail. Because --disable works at the publisher level, rather than the mirror level, one must remove the mirror configuration altogether to bypass the issue.

The pkg command should probably:

  • reduce the connection timeout to something sensible like 10-20 seconds
  • remember that it failed at least once during this session and not continue to get stuck using it
@citrus-it
Copy link
Member

Interestingly, you can disable individual origins, but not mirrors. That seems like a bug too

theeo# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
omnios                      origin   online F https://pkg.omnios.org/r151050/staging/
omnios                      mirror   online F https://us-west.mirror.omnios.org/r151050/core/
extra.omnios                origin   online F https://pkg.omnios.org/r151050/extra/

theeo# pkg set-publisher --disable -g https://pkg.omnios.org/r151050/staging omnios

theeo# pkg publisher
PUBLISHER                   TYPE     STATUS P LOCATION
omnios                      origin   disabled F https://pkg.omnios.org/r151050/staging/
omnios                      mirror   online F https://us-west.mirror.omnios.org/r151050/core/
extra.omnios                origin   online F https://pkg.omnios.org/r151050/extra/

theeo# pkg set-publisher --disable -m https://us-west.mirror.omnios.org/r151050/core omnios
Mirror 'https://us-west.mirror.omnios.org/r151050/core/' already exists for the specified publisher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants