Upgrading Elastic-Agent via Fleet in an Air-gapped environment failing


We have an air-gapped environment. Recently upgraded to 8.0.0. The Fleet GUI is rightly showing that the elastic-agents (Linux tar.gz installed) have an upgrade is available, but when trying to upgrade we get the following error:

[elastic_agent][error] failed to dispatch actions, error: failed upgrade of agent binary: 2 errors occurred:
	* package '/opt/Elastic/Agent/data/elastic-agent-93708b/downloads/elastic-agent-8.0.0-linux-x86_64.tar.gz' not found: open /opt/Elastic/Agent/data/elastic-agent-93708b/downloads/elastic-agent-8.0.0-linux-x86_64.tar.gz: no such file or directory
	* fetching package failed: Get "https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-8.0.0-linux-x86_64.tar.gz": context deadline exceeded

I tried to put the already downloaded package in the downloads directory in the error, and re-run the upgrade, but the agent appears to have deleted the existing file and tried to download from the internet again.

Is there any option to specify a local location for the elastic-agent-8.0.0-linux-x86_64.tar.gz package, instead of the one found on the internet that the servers do not have access to?

This capability is not available at the moment, but we have plans to add it in the future [Fleet] Ability to configure agent.download.sourceURI in Kibana · Issue #100413 · elastic/kibana · GitHub. One workaround is to set up a proxy server. Another is to uninstall the old agent via CLI, then install the new version.