Skip to content

Commit

Permalink
bnc#986124
Browse files Browse the repository at this point in the history
  • Loading branch information
schubi2 committed Feb 3, 2017
1 parent 842cbc9 commit 8b20b66
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 12 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.17.57.4
2.17.57.5
7 changes: 7 additions & 0 deletions package/autoyast2.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Fri Feb 3 13:47:23 CET 2017 - schubi@suse.de

- Exporting "/dev/nfs" containers for nfs volumes correctly.
(bnc#986124)
- version 2.17.57.5

-------------------------------------------------------------------
Tue Mar 4 18:25:17 CET 2014 - fehr@suse.de

Expand Down
24 changes: 15 additions & 9 deletions src/modules/AutoinstDrive.ycp
Original file line number Diff line number Diff line change
Expand Up @@ -335,15 +335,21 @@
newDrive = set( newDrive, "initialize", drive["initialize"]:true );
newDrive = set( newDrive, "use", string2symbol( drive["use"]:"all" ));
newDrive = set( newDrive, "pesize", drive["pesize"]:"" );
foreach( map part, drive["partitions"]:[], {
PartitionT newPart = AutoinstPartition::parsePartition( part );
if( AutoinstPartition::isPartition( newPart ) ){
newDrive = addPartition( newDrive, newPart );
}
else{
y2error("Couldn't construct PartitionT from '%1'", part );
}
});
if( drive["type"]:`x == `CT_NFS ) {
newDrive = set( newDrive, "initialize", false); // Do not initialize
// If it is a root nfs partition we do not need any additional
// partition conversion. (bnc#986124)
newDrive = set( newDrive, "partitions", drive["partitions"]:[]);
} else {
foreach( map part, drive["partitions"]:[], {
PartitionT newPart = AutoinstPartition::parsePartition( part );
if( AutoinstPartition::isPartition( newPart ) ){
newDrive = addPartition( newDrive, newPart );
} else {
y2error("Couldn't construct PartitionT from '%1'", part );
}
});
}
return newDrive;
}

Expand Down
28 changes: 26 additions & 2 deletions src/modules/AutoinstPartPlan.ycp
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,23 @@
Mode::SetMode("normal");
StorageDevices::InitDone();
map<string, map> StorageMap = eval(Storage::GetTargetMap());

StorageMap=filter(string d, map p, StorageMap, ``( d != "/dev/evms" && d != "/dev/nfs" && d != "/dev/tmpfs" && size(p["partitions"]:[]) > 0));
StorageMap=filter(string d, map p, StorageMap, ``{
boolean ok = ( d != "/dev/evms" &&
d != "/dev/tmpfs" &&
size(p["partitions"]:[]) > 0 );
if( ok && d == "/dev/nfs" ) {
// Checking if /dev/nfs container has a root partition.
// If yes, it can be taken for the plan (bnc#986124)
ok = false;
foreach(map part, p["partitions"]:[], ``{
if( part["mount"]:"" == "/" ) {
ok = true;
break;
}
});
}
return ok;
});
y2milestone("Storagemap %1", StorageMap);
// list evms_vgs = [];

Expand All @@ -374,6 +389,15 @@
if( pe["type"]:`x == `extended )
continue;
map new_pe = $[];
// Handling /dev/nfs containers (bnc#986124)
if( pe["type"]:`x == `nfs ) {
new_pe["type"] = pe["type"]:`nfs;
new_pe["device"] = pe["device"]:"";
new_pe["mount"] = pe["mount"]:"";
new_pe["fstopt"] = pe["fstopt"]:"";
partitions = add(partitions,new_pe);
continue;
}
new_pe["create"] = true;
boolean skipwin = false;
if (haskey(pe,"enc_type")) {
Expand Down

0 comments on commit 8b20b66

Please sign in to comment.