Skip to content

Commit

Permalink
Merge pull request #231 from yast/bnc_986124_sles11_sp3
Browse files Browse the repository at this point in the history
Bnc 986124 sles11 sp3 
thanks martin !
  • Loading branch information
schubi2 committed Jul 20, 2016
2 parents 13c0ab0 + d48a2c8 commit 6540f51
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 13 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.17.74
2.17.74.1
7 changes: 7 additions & 0 deletions package/autoyast2.changes
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Jul 18 15:02:31 CEST 2016 - schubi@suse.de

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

-------------------------------------------------------------------
Thu Oct 2 10:13:33 CEST 2014 - schubi@suse.de

Expand Down
25 changes: 16 additions & 9 deletions src/modules/AutoinstDrive.ycp
Expand Up @@ -330,20 +330,27 @@
*/
global define DriveT
parseDrive( map drive ){

DriveT newDrive = new( "auto", drive["type"]:`CT_DISK );
newDrive = set( newDrive, "device", drive["device"]:"auto" );
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 conversation. (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
31 changes: 28 additions & 3 deletions src/modules/AutoinstPartPlan.ycp
Expand Up @@ -357,9 +357,25 @@
{
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));
map<string, map> StorageMap = eval(Storage::GetTargetMap());

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 @@ -375,6 +391,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 6540f51

Please sign in to comment.