Skip to content

Applications page: avoid remote repository call long waits #8161

Closed

Description

@DavidePrincipi

The Applications page reuses list-modules, the Software Center action that queries every enabled repository over HTTP(S). When a repository is unreachable or disabled, the page stalls in a loading state for ~20s (each repository call burns its own timeout, sequentially, uncached), and the same reuse causes #8139: an app's locally-shipped logo is discarded in favor of the generic placeholder whenever the repository is unreachable. Applications page only needs to know what is already installed in the cluster, a local concern, while Software Center's job is discovering what can be installed from remote repositories; reusing one action for both ties local-only UI to remote-repository latency and failure modes.

Proposed solution

[Edit]

Keep a single list-modules action and no offline mode. Make the existing repository loop resilient (e.g. cache negative results, run repositories in parallel, shorten timeouts). This just reduces the wait (see also #8088), but is simple to implement.

Alternative solutions

Implement a separate, dedicated action for the Applications page (discarded for complexity and code duplication).

See also

Activity

  1. moved this from ToDo to In Progress in NethServeron Sep 9, 2026
  2. self-assigned this
    on Sep 9, 2026
  3. DavidePrincipi commented on Sep 10, 2026

    @DavidePrincipi
    MemberAuthor

    The solution implemented by NethServer/ns8-core#1302 is the second alternative.

    • It keeps the UI change minimal. Only the logo display logic is fixed to correctly display the local URL, as Software Center already does
    • It improves the remote fetch by running parallel requests, so timeouts do not sum for multiple repositories
    • It caches the remote error for one minute to improve UI navigation
  4. DavidePrincipi commented on Sep 10, 2026

    @DavidePrincipi
    MemberAuthor

    Simulate unresponsive repository server by dropping outgoing packets:

    nft add table inet test_blackhole
    nft add chain inet test_blackhole output { type filter hook output priority 0 \; }
    for server in subscription.nethserver.com distfeed.nethserver.org forge.nethserver.org ; do
      getent ahosts $server | awk '$1 !~ /:/ {print $1}' | sort -u | \
        xargs -r -I{} nft add rule inet test_blackhole output ip daddr {} drop
      getent ahosts $server | awk '$1 ~ /:/ {print $1}' | sort -u | \
        xargs -r -I{} nft add rule inet test_blackhole output ip6 daddr {} drop
    done
    

    Simulate DNS resolver failure: drop packets for DNS resolver (replace <DNS_IP> with values from /etc/resolv.conf):

    nft add rule inet test_blackhole output ip daddr <DNS_IP> drop
    

    List current drop rules:

    nft --handle list chain inet test_blackhole output
    

    Delete a specific rule by handle number:

    nft delete rule inet test_blackhole output handle 4
    

    Clear the test_blackhole table completely:

    nft delete table inet test_blackhole
    
  5. changed the title [-]Applications page: avoid remote repository calls[/-] [+]Applications page: avoid remote repository call long waits[/+] on Sep 16, 2026
  6. removed their assignment
    on Sep 17, 2026
  7. added
    testing
    on Sep 17, 2026
  8. moved this from In Progress to Testing in NethServeron Sep 17, 2026
  9. DavidePrincipi commented on Sep 17, 2026

    @DavidePrincipi
    MemberAuthor

    In Testing core:3.22.0-dev.10

    Test case

    • Check updates works in both manual and automatic mode, if a remote repository is not working properly.
    • Check logo is displayed even if the repository is not reachable or disabled.
  10. DavidePrincipi commented on Sep 18, 2026

    @DavidePrincipi
    MemberAuthor

    VERIFIED

  11. removed their assignment
    on Sep 18, 2026
  12. added
    verified
    on Sep 18, 2026
  13. removed
    testing
    on Sep 18, 2026
  14. moved this from Testing to Verified in NethServeron Sep 18, 2026
  15. DavidePrincipi commented on Sep 18, 2026

    @DavidePrincipi
    MemberAuthor
  16. moved this from Verified to Done in NethServeron Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    verified

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions