diff --git a/include/BackupIncrements.h b/include/BackupIncrements.h index 02f824bb77..e9a930727e 100644 --- a/include/BackupIncrements.h +++ b/include/BackupIncrements.h @@ -135,7 +135,7 @@ public: typedef class IncIterator inc_iterator; private: - ExtendedAttribute * attribute_factory(VectorAttribute * va, int id) const + ExtendedAttribute * attribute_factory(VectorAttribute * va, int id) const override { return new Increment(va, id); }; diff --git a/src/lcm/LifeCycleActions.cc b/src/lcm/LifeCycleActions.cc index 2b109fd04f..09d752a21c 100644 --- a/src/lcm/LifeCycleActions.cc +++ b/src/lcm/LifeCycleActions.cc @@ -2039,7 +2039,7 @@ void LifeCycleManager::trigger_updatevnet(int vnid) // ------------------------------------------------------------- if ( is_tmpl || is_update ) { - auto rc = vm->nic_update(vnid); + rc = vm->nic_update(vnid); if (rc < 0) { diff --git a/src/rm/RequestManagerVirtualMachine.cc b/src/rm/RequestManagerVirtualMachine.cc index d98f3ecf89..0bc52d13fe 100644 --- a/src/rm/RequestManagerVirtualMachine.cc +++ b/src/rm/RequestManagerVirtualMachine.cc @@ -3974,8 +3974,6 @@ void VirtualMachineBackup::request_execute( Backups::Mode mode; int li_id; - ostringstream oss; - // ------------------------------------------------------------------------ // Get request parameters // ------------------------------------------------------------------------ diff --git a/src/scheduler/include/ScheduledActionXML.h b/src/scheduler/include/ScheduledActionXML.h index 29abd278ac..4b4ec8d4c6 100644 --- a/src/scheduler/include/ScheduledActionXML.h +++ b/src/scheduler/include/ScheduledActionXML.h @@ -59,9 +59,9 @@ private: VMBackupAction():backup("SCHED_ACTION"){}; /** ID of the VM and action**/ - int vm_id; + int vm_id = -1; - int action_id; + int action_id = -1; /** Pending backup operation **/ VectorAttribute backup; diff --git a/src/scheduler/include/Scheduler.h b/src/scheduler/include/Scheduler.h index a85e76ecfc..7e2609eae9 100644 --- a/src/scheduler/include/Scheduler.h +++ b/src/scheduler/include/Scheduler.h @@ -80,7 +80,9 @@ protected: host_dispatch_limit(0), zone_id(0), mem_ds_scale(0), - diff_vnets(false) + diff_vnets(false), + max_backups(5), + max_backups_host(2) { } diff --git a/src/scheduler/include/VirtualMachinePoolXML.h b/src/scheduler/include/VirtualMachinePoolXML.h index 86bb9fe48e..0f0f394fa6 100644 --- a/src/scheduler/include/VirtualMachinePoolXML.h +++ b/src/scheduler/include/VirtualMachinePoolXML.h @@ -163,12 +163,12 @@ public: */ int set_up() override; - int active_backups() + int active_backups() const { return _active_backups; } - int host_backups(int host_id) + int host_backups(int host_id) const { return backups_host[host_id]; } @@ -183,7 +183,7 @@ protected: /** * Total backup operations in progress */ - mutable int _active_backups; + mutable int _active_backups = 0; /** * Backup operations per host diff --git a/src/scheduler/src/pool/VirtualMachinePoolXML.cc b/src/scheduler/src/pool/VirtualMachinePoolXML.cc index 123858276d..916021ec54 100644 --- a/src/scheduler/src/pool/VirtualMachinePoolXML.cc +++ b/src/scheduler/src/pool/VirtualMachinePoolXML.cc @@ -332,7 +332,7 @@ int VirtualMachineActionsPoolXML::get_suitable_nodes( << " and (not(DONE > 0) or boolean(REPEAT))) or " << "( TIME[starts-with(text(),\"+\")] and not(DONE>0) ) ]/../.."; - return get_nodes(oss.str().c_str(), content); + return get_nodes(oss.str(), content); } /* -------------------------------------------------------------------------- */ diff --git a/src/vmm/VirtualMachineManager.cc b/src/vmm/VirtualMachineManager.cc index bfa7c32e1a..9f5957ac41 100644 --- a/src/vmm/VirtualMachineManager.cc +++ b/src/vmm/VirtualMachineManager.cc @@ -2374,8 +2374,6 @@ int VirtualMachineManager::updatenic(VirtualMachine * vm, int vnid) string vm_tmpl; string drv_msg; - ostringstream os; - if (!vm->hasHistory()) { return -1;