How to fix the "Apply Configuration" button

pinguin

New Member
Nov 22, 2019
13
0
1
Hello,

I would like to apply the network configuration without reboot. But when I click the "Apply Configuration" button, I get the following error:

you need ifupdown2 to reload network configuration (500)

I can't install the 'ifupdown2' package, because of the following error:
Code:
root@pve01:~# apt install ifupdown2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  python-argcomplete
Suggested packages:
  ethtool python-gvgen python-mako
The following packages will be REMOVED:
  ifenslave ifupdown libproxmox-acme-perl libpve-access-control
  libpve-cluster-api-perl libpve-cluster-perl libpve-common-perl
  libpve-guest-common-perl libpve-http-server-perl libpve-storage-perl
  librados2-perl proxmox-ve pve-cluster pve-container pve-firewall
  pve-ha-manager pve-manager pve-xtermjs qemu-server
The following NEW packages will be installed:
  ifupdown2 python-argcomplete
0 upgraded, 2 newly installed, 19 to remove and 0 not upgraded.
Need to get 0 B/225 kB of archives.
After this operation, 14.3 MB disk space will be freed.
Do you want to continue? [Y/n] y
W: (pve-apt-hook) !! WARNING !!
W: (pve-apt-hook) You are attempting to remove the meta-package 'proxmox-ve'!
W: (pve-apt-hook) 
W: (pve-apt-hook) If you really want to permanently remove 'proxmox-ve' from your system, run the following command
W: (pve-apt-hook)       touch '/please-remove-proxmox-ve'
W: (pve-apt-hook) run apt purge proxmox-ve to remove the meta-package
W: (pve-apt-hook) and repeat your apt invocation.
W: (pve-apt-hook) 
W: (pve-apt-hook) If you are unsure why 'proxmox-ve' would be removed, please verify
W: (pve-apt-hook)       - your APT repository settings
W: (pve-apt-hook)       - that you are using 'apt full-upgrade' to upgrade your system
E: Sub-process /usr/share/proxmox-ve/pve-apt-hook returned an error code (1)
E: Failure running script /usr/share/proxmox-ve/pve-apt-hook
How can I fix this issue?
 
Can you show the output of apt update? This sounds like a repository is misconfigured.
 
The fix is to run these two commands:

Bash:
echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" >> /etc/apt/sources.list
apt update && apt install ifupdown2

Here's my terminal showing pre-repository, adding the repository, and then successfully installing ifupdown2, which allowed me to use Apply Networking in the WebUI:

Bash:
root@pve2:/etc/apt# cat sources.list
deb http://ftp.us.debian.org/debian buster main contrib

deb http://ftp.us.debian.org/debian buster-updates main contrib

# security updates
deb http://security.debian.org buster/updates main contrib
root@pve2:/etc/apt# echo "deb http://download.proxmox.com/debian/pve buster pve-no-subscription" >> sources.list
root@pve2:/etc/apt# cat sources.list
deb http://ftp.us.debian.org/debian buster main contrib

deb http://ftp.us.debian.org/debian buster-updates main contrib

# security updates
deb http://security.debian.org buster/updates main contrib
deb http://download.proxmox.com/debian/pve buster pve-no-subscription
root@pve2:/etc/apt# apt update && apt install ifupdown2
Hit:1 http://ftp.us.debian.org/debian buster InRelease
Hit:2 http://ftp.us.debian.org/debian buster-updates InRelease
Hit:3 http://security.debian.org buster/updates InRelease     
Get:4 http://download.proxmox.com/debian/pve buster InRelease [3,051 B]
Get:5 http://download.proxmox.com/debian/pve buster/pve-no-subscription amd64 Packages [264 kB]
Fetched 267 kB in 1s (238 kB/s)   
Reading package lists... Done
Building dependency tree       
Reading state information... Done
34 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Ignoring file 'pve-enterprise.list.backup' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  ethtool python3-gvgen python3-mako
The following packages will be REMOVED:
  ifenslave ifupdown
The following NEW packages will be installed:
  ifupdown2
0 upgraded, 1 newly installed, 2 to remove and 34 not upgraded.
Need to get 226 kB of archives.
After this operation, 1,333 kB of additional disk space will be used.
N: Ignoring file 'pve-enterprise.list.backup' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
Do you want to continue? [Y/n] y
Get:1 http://download.proxmox.com/debian/pve buster/pve-no-subscription amd64 ifupdown2 all 3.0.0-1+pve2 [226 kB]
Fetched 226 kB in 0s (861 kB/s)   
N: Ignoring file 'pve-enterprise.list.backup' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension
dpkg: ifupdown: dependency problems, but removing anyway as you requested:
 ifenslave depends on ifupdown (>= 0.7.46).

(Reading database ... 44063 files and directories currently installed.)
Removing ifupdown (0.8.35+pve1) ...
Selecting previously unselected package ifupdown2.
(Reading database ... 44027 files and directories currently installed.)
Preparing to unpack .../ifupdown2_3.0.0-1+pve2_all.deb ...
Unpacking ifupdown2 (3.0.0-1+pve2) ...
dpkg: ifenslave: dependency problems, but removing anyway as you requested:
 pve-manager depends on ifenslave (>= 2.6) | ifupdown2 (>= 2.0.1-1+pve8); however:
  Package ifenslave is to be removed.
  Package ifupdown2 is not configured yet.

(Reading database ... 44147 files and directories currently installed.)
Removing ifenslave (2.9) ...
Setting up ifupdown2 (3.0.0-1+pve2) ...
Installing new version of config file /etc/default/networking ...

network config changes have been detected for ifupdown2 compatibility.
Saved in /etc/network/interfaces.new for hot-apply or next reboot.

Processing triggers for man-db (2.8.5-2) ...
root@pve2:/etc/apt#
 
There are no fix, you need to reboot.
The above command doesn't work:

Hit:1 http://ftp.ca.debian.org/debian buster InRelease
Get:2 http://ftp.ca.debian.org/debian buster-updates InRelease [51.9 kB]
Hit:3 http://security.debian.org buster/updates InRelease
Err:4 https://enterprise.proxmox.com/debian/pve buster InRelease
401 Unauthorized [IP: 144.217.225.162 443]
Get:5 http://download.proxmox.com/debian/pve buster InRelease [3,051 B]
Get:6 http://download.proxmox.com/debian/pve buster/pve-no-subscription amd64 Packages [323 kB]
Reading package lists... Done
E: Failed to fetch https://enterprise.proxmox.com/debian/pve/dists/buster/InRelease 401 Unauthorized [IP: 144.217.225.162 443]
E: The repository 'https://enterprise.proxmox.com/debian/pve buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Incomplete product, you should not have to add package when the web interface show an apply button.
Not impress of that product.
Uninstalled ... byebye
 
The above command doesn't work:
it does work if you take the time to understand what it does and how it works:

'&&' on the cli only executes the second command if the first one succeeds
in your case 'apt update' did not succeed because you still have the enterprise repository configured but no subscription

possible solutions:
* either buy a subscription (so that the enterprise repository works)
* execute the commands individually (first 'apt update' and then 'apt install ifupdown2')
* remove the enterprise repo from you configuration

Incomplete product, you should not have to add package when the web interface show an apply button.
ifupdown2 may not work with all network configurations, so it is not installed by default, but we still have the button show up to make it easy to apply the config for those users that use ifupdown2
 
  • Like
Reactions: crazy_otto
it does work if you take the time to understand what it does and how it works:

'&&' on the cli only executes the second command if the first one succeeds
in your case 'apt update' did not succeed because you still have the enterprise repository configured but no subscription

possible solutions:
* either buy a subscription (so that the enterprise repository works)
* execute the commands individually (first 'apt update' and then 'apt install ifupdown2')
* remove the enterprise repo from you configuration


ifupdown2 may not work with all network configurations, so it is not installed by default, but we still have the button show up to make it easy to apply the config for those users that use ifupdown2
I know I'm coming to the conversation late, but confirming this works just as @dcsapak said.

Just take the time to understand the commands, what they do, and WHY they are doing the what.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!