Repository navigation
feat: Performance - load host data in the background and stop reporting failed pre-checks - #179
Merged
Merged
Conversation
…topped The checks before the settings menu waited on pveversion, two pvesm status calls, pvesh and, on clusters, pvecm, one after the other. core/build.func now starts them in the background before it downloads the engine; the checks read the results through _cs_probe_read and run a command themselves only when its probe failed or never ran. The storage check trusts a probe's yes and asks a no again live. Telemetry starts with the install record the build sends. A run that ends before it, in the checks or a dialog, reports nothing: a host that is not ready is not a failed install, and these runs made up a third of the failures since 27 October. Tools and add-ons have no such point, so their "requirement not met" codes send nothing either. root_check now runs before pve_check. As another user /etc/pve/storage.cfg is unreadable, and the cluster check reported a damaged cluster. log_msg and log_section no longer end a run when the log cannot be written.
From the menu to the storage dialog a default install waited about eight seconds on Perl: pvesh /cluster/resources once per ID tried, pveversion once per telemetry send, pvesm status before every storage decision, and pveam for the template catalog. The probes started at load now also take pvesm status and pveam available. check_storage_support, the storage dialogs, the preselect and space checks and the content checks after the dialog read them through _pvesm_status; _offer_storage_content drops them when it changes a storage. validate_container_id and the late ID check look for the guest config under /etc/pve/nodes, which pmxcfs keeps for every node; pvesh is the fallback without it. telemetry_collect_sysinfo takes the cached version, since every payload is built in a subshell and its own cache never reached the caller. variables no longer asks for the version before the menu.
base_settings already found a free ID before advanced_settings runs. The dialog offered NEXTID instead, which a leftover disk can hold, and then answered its own suggestion with 'ID already in use'.
The VM engine has no _pve_version, so every telemetry payload, built in a subshell, started pveversion again; pve_check now keeps the version it read and telemetry_collect_sysinfo uses it. cleanup asked qm config whether the VM exists; its config file says the same.
…om no container The probes forked six times from the script's own shell before the engine download; on the arm64 host that held the download back by a fifth of a second. One subshell now starts them. lxc_os_support_check asks pve-container through Perl whether it can set up the release, between "Creating" and the storage dialog. variables() knows the release and starts that question as a probe; a release changed in the advanced settings is asked live. ensure_log_on_host pulled the install log and the error capture from the container after every failure, including those before pct create, where each pull waited for its timeout to find no container.
Contributor
Try this branchThe engine and the scripts resolve independently, so a production script can COMMUNITY_SCRIPTS_CORE_URL=https://raw.githubusercontent.com/community-scripts/core/perf/faster-start \
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/debian.sh)"Swap This PR touches Run a script from a fork as wellcurl -fsSL https://raw.githubusercontent.com/community-scripts/core/perf/faster-start/tools/run.sh |
bash -s -- https://raw.githubusercontent.com/YOU/DevScripts/your-branch ct/debian.sh \
https://raw.githubusercontent.com/community-scripts/core/perf/faster-startNote that Useful flags while testing
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
✍️ Description
core/build.funcstartspveversion,pvesm status(all/vztmpl/rootdir),pveam available,pvesh nextidandpvecm statusin the background before the engine download;variablesadds the pve-container OS check_cs_probe_read/_cs_probe_rc/_pvesm_status, fall back to the live command, and_cs_probe_dropdiscards stale data afterpvesm set/pveam update/etc/pve/nodes/*/{lxc,qemu-server}instead ofpvesh /cluster/resources(~1 s per ID tried)pveversionfor every send (LXC and VM)root_checkruns beforepve_check(non-root users got "storage.cfg is missing")var_ctidensure_log_on_hostskipspct pullwhen no container exists (~2 s on early failures)log_msg/log_sectionnever abort a run🔗 Related Issue
Fixes #
✅ Prerequisites (X in brackets)
API.txtwas updated to match.🤖 AI Assistance (X in brackets)
🛠️ Type of Change (X in brackets)
README,docs/,CONTRIBUTING.md, or other docs.