Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Issue with ProGet and connector cache in rootless container

    Scheduled Pinned Locked Moved Support
    4 Posts 2 Posters 42 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Y Offline
      Yoeri.rousseaux_8527
      last edited by

      We're trying to setup a test environment with proget container to see if it can replace our current nuget.server, so at the moment this is a free licence setup.
      Policy here is to setup our containers with rootless users.
      The main setup is working, even the kestrel wasn't trowing errors without the config as described here (we did however applied these settings afterwards to make sure this wasn't part of the problem described bellow)
      We've tested several methods to see if everything works as expected, we have two feeds setup for powershell modules, one without a connector to psgallery and one with.
      The following work flawless with both feeds find-module, publish-module, however when we try to install a package that hasn't been cached yet, there is an error thrown in powershell (notice the 404)

      Install-Module -Name IvantiPS -Scope CurrentUser -Repository PSGalleryLocal -Force
      PackageManagement\Install-Package : Package 'IvantiPS' failed to be installed because: Het einde van de record voor de
      centrale map is niet gevonden.
      At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
      + ...          $null = PackageManagement\Install-Package @PSBoundParameters
      +                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          + CategoryInfo          : InvalidResult: (IvantiPS:String) [Install-Package], Exception
          + FullyQualifiedErrorId : Package '{0}' failed to be installed because: {1},Microsoft.PowerShell.PackageManagement
         .Cmdlets.InstallPackage
      

      In the logs of the container we then see the following happening

      info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
            Request starting HTTP/1.1 GET http://nuget.qa.xxx.be/nuget/PSGallery - - -
      info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
            Request finished HTTP/1.1 GET http://nuget.qa.xxx.be/nuget/PSGallery - 200 273 text/xml 2.7007ms
      info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
            Request starting HTTP/1.1 GET http://nuget.qa.xxx.be/nuget/PSGallery/FindPackagesById()?id='FoooBarr' - - -
      info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
            Request finished HTTP/1.1 GET http://nuget.qa.xxx.be/nuget/PSGallery/FindPackagesById()?id='FoooBarr' - 200 504 application/atom+xml 213.2596ms
      info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
            Request starting HTTP/1.1 GET http://nuget.qa.xxx.be/nuget/PSGallery/FindPackagesById()?id='IvantiPS'&$skip=0&$top=40 - - -
      info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
            Request starting HTTP/1.1 GET http://nuget.qa.xxx.be/ - - -
      info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
            Request finished HTTP/1.1 GET http://nuget.qa.xxx.be/ - 200 14205 text/html;+charset=UTF-8 3.0951ms
      info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
            Request finished HTTP/1.1 GET http://nuget.qa.xxx.be/nuget/PSGallery/FindPackagesById()?id='IvantiPS'&$skip=0&$top=40 - 200 14137 application/atom+xml 182.2315ms
      info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
            Request starting HTTP/1.1 GET http://nuget.qa.xxx.be/nuget/PSGallery/package/IvantiPS/0.1.8 - - -
      info: Microsoft.AspNetCore.Hosting.Diagnostics[2]
            Request finished HTTP/1.1 GET http://nuget.qa.xxx.be/nuget/PSGallery/package/IvantiPS/0.1.8 - 404 24 - 746.6243ms
      

      When a package has been published to the same feed and then installed there is no issue, so it's like the copy/move from the psgallery-download is failing somewhere along the road. The same command to my own setup at home (without rootless setup) does work, so i think something is missing in the documentation to make caching work in a rootless setup, specific folders, permissions, config?

      Hope someone can help us out!

      dean-houstonD 1 Reply Last reply Reply Quote 0
      • dean-houstonD Offline
        dean-houston inedo-engineer @Yoeri.rousseaux_8527
        last edited by

        Hi @Yoeri-rousseaux_8527,

        Unfortunately the PowerShell gallery is pretty buggy/slow/glitchy these days. We don't think it's actively maintained by Microsoft anymore, as their attention is shifted to "next gen" (PSGet 3.0).

        Connectors to the gallery don't work as well as they should, and you may find using an approval workflow (i.e. pulling them proactively, promoting them to other feeds, etc) is the most reliable. Many queries to PowerShellGallery.org (especially a FindPackagesById()) will simply timeout, which will cause ProGet to log an error (Admin > Diagnostic Center) and return a 404 in the API.

        There are also versioning and API quirks that you should be aware of. They apply to some packages (mostly older, but some newer, sometimes). It's not easy for us to work-around these without a major development effort, and most of our users have learned how to deal with these annoyances.

        However, this should all work in PSGet3.0. Now they are about 5 years behind on the release... BUT with Copilot's help, perhaps 2025 just might be the year they get it fixed!

        -- Dean

        1 Reply Last reply Reply Quote 0
        • Y Offline
          Yoeri.rousseaux_8527
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • Y Offline
            Yoeri.rousseaux_8527
            last edited by

            Hiya,

            We changed the setup to root, but still encountered the same issue. Besides rootless container policy we're also doing segmentation of every platform, so only allowing powershellgallery.com wasn't enough. after extented search and looking through logs we saw that the CDN's of powershellgallery were being dropped.

            Will probably revert the setup and go back rootless after the holidays to see if everything still works flawless, be I guess it will be fine now :)
            Thanks for your insight!

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation