Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
e980e2ea
Commit
e980e2ea
authored
Feb 03, 2015
by
Leigh B Stoller
Browse files
More tweaks for global images.
parent
8144c58c
Changes
3
Hide whitespace changes
Inline
Side-by-side
apt/manage_instance.in
View file @
e980e2ea
...
...
@@ -301,6 +301,7 @@ sub DoSnapshot()
"
slice_urn
"
=>
$slice
->
urn
(),
"
imagename
"
=>
$imagename
,
"
sliver_urn
"
=>
$sliver_urn
,
"
global
"
=>
1
,
"
credentials
"
=>
[
$slice_credential
->
asString
(),
$speaksfor_credential
->
asString
()],
};
...
...
backend/newimageid_ez.in
View file @
e980e2ea
#!/usr/bin/perl -wT
#
# Copyright (c) 2000-201
4
University of Utah and the Flux Group.
# Copyright (c) 2000-201
5
University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
...
...
@@ -517,7 +517,7 @@ if (!exists($newimageid_args{"path"}) ||
elsif
(
!
$isadmin
)
{
my
$pdef
=
"";
if
(
!
$shared
&&
if
(
!
(
$shared
||
$global
)
&&
exists
(
$newimageid_args
{"
gid
"})
&&
$newimageid_args
{"
gid
"}
ne
""
&&
$newimageid_args
{"
gid
"}
ne
$newimageid_args
{"
pid
"})
{
...
...
@@ -711,8 +711,8 @@ $newimageid_args{"ezid"} = 1;
# OSInfo->Create args not quite the same as Image->Create ones so copy
# newimageid_args into a new hash and fix up values.
my
%newosid_args
=
%newimageid_args
;
$newosid_args
{"
shared
"}
=
$newimageid_args
{"
global
"}
if
exists
$newimageid_args
{"
global
"}
;
$newosid_args
{"
shared
"}
=
$newimageid_args
{"
global
"}
=
1
if
(
$
global
)
;
my
$usrerr
;
my
$new_osinfo
=
OSinfo
->
Create
(
$project
,
$this_user
,
$imagename
,
\
%newosid_args
,
\
$usrerr
);
...
...
utils/clone_image.in
View file @
e980e2ea
...
...
@@ -65,8 +65,8 @@ my $nosnapshot = 0;
my
$isvirtnode
=
0
;
my
$waitmode
=
0
;
my
$nodelta
=
0
;
# To pass to create_image.
my
$global
;
my
$shared
;
my
$global
=
0
;
my
$shared
=
0
;
#
# Configure variables
...
...
@@ -376,8 +376,9 @@ if (Image->LookupByName($imagename) && !$this_user->IsAdmin()) {
fatal
("
Not allowed to shadow snapshot a system image
");
}
# Subgroups change the path
my
$path
=
(
$experiment
->
pid
()
eq
$experiment
->
gid
()
?
# Subgroups change the path, but a global image should still
# go into the project image directory.
my
$path
=
(
$experiment
->
pid
()
eq
$experiment
->
gid
()
||
$global
?
"
$PROJROOT
/
$pid
/images/
${imagename}
.ndz
"
:
"
$GROUPROOT
/
$pid
/
$gid
/images/
${imagename}
.ndz
");
...
...
@@ -405,10 +406,10 @@ $xmlfields{"reboot_waittime"} = $base_osinfo->reboot_waittime()
$xmlfields
{"
osfeatures
"}
=
$base_osinfo
->
osfeatures
()
if
(
defined
(
$base_osinfo
->
osfeatures
())
&&
$base_osinfo
->
osfeatures
()
ne
"");
if
(
defined
(
$global
)
&&
$global
)
{
if
(
$global
)
{
$xmlfields
{"
global
"}
=
1
;
}
elsif
(
defined
(
$shared
)
&&
$shared
)
{
elsif
(
$shared
)
{
$xmlfields
{"
shared
"}
=
1
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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