vzctl set: fix double warning and a bug
(1) Double warning
The code which this patch removes warns user that some parameters
can not be applied runtime. Such warnings are already printed by
check_set_mode() function so without this patch we had this:
Unable to set capability on running container
WARNING: Some of the parameters could not be applied to a running container.
Please consider using --setmode option
Unable to set capability on running container
Function set() calls check_set_mode() which prints the first warning,
then it calls vps_setup_res() which prints the second one.
Also, vps_setup_res() is called from yet another place --
vps_start_custom(), but in this case the code this patch removes
is not executed anyway since vps_state is not STATE_RUNNING.
(2) Bug
This patch also fixes a real bug -- in case a user ran "vzctl set"
for a running container and one of the parameters was --iptables (which
can not be applied to a running container) then some options were
skipped due to "return VZ_SET_IPTABLES;" statement. These options are:
- hostname
- nameserver
- disk quota parameters
- veth parameters
Now these options are applied in such a case.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed