Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
7b151944
Commit
7b151944
authored
May 22, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow to delete pools with non-existent VMs/Storage
parent
7f87932a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
Pool.pm
PVE/API2/Pool.pm
+14
-2
changelog.Debian
debian/changelog.Debian
+2
-0
No files found.
PVE/API2/Pool.pm
View file @
7b151944
...
...
@@ -311,6 +311,11 @@ __PACKAGE__->register_method ({
PVE::AccessControl::
lock_user_config
(
sub
{
my
$vmlist
=
PVE::Cluster::
get_vmlist
()
||
{};
my
$idlist
=
$vmlist
->
{
ids
}
||
{};
my
$storecfg
=
PVE::Storage::
config
();
my
$usercfg
=
cfs_read_file
("
user.cfg
");
my
$pool
=
$param
->
{
poolid
};
...
...
@@ -320,8 +325,15 @@ __PACKAGE__->register_method ({
die
"
pool '
$pool
' does not exist
\n
"
if
!
$data
;
die
"
pool '
$pool
' is not empty
\n
"
if
scalar
(
keys
%
{
$data
->
{
vms
}})
||
scalar
(
keys
%
{
$data
->
{
storage
}});
foreach
my
$vmid
(
keys
%
{
$data
->
{
vms
}})
{
next
if
!
$idlist
->
{
$vmid
};
die
"
pool '
$pool
' is not empty (contains VM
$vmid
)
\n
";
}
foreach
my
$storeid
(
keys
%
{
$data
->
{
storage
}})
{
next
if
!
PVE::Storage::
storage_config
(
$storecfg
,
$storeid
,
1
);
die
"
pool '
$pool
' is not empty (contains storage '
$storeid
')
\n
";
}
delete
(
$usercfg
->
{
pools
}
->
{
$pool
});
...
...
debian/changelog.Debian
View file @
7b151944
...
...
@@ -3,6 +3,8 @@ pve-manager (3.0-19) unstable; urgency=low
* updated Chinese translation
* allow to upload files with spaces in filename (replace with '_')
* allow to delete pools with non-existent VMs/Storage
-- Proxmox Support Team <support@proxmox.com> Wed, 22 May 2013 06:04:49 +0200
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment