Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unassigned FC network #606

Closed
davidwallis opened this issue Apr 7, 2022 · 8 comments
Closed

unassigned FC network #606

davidwallis opened this issue Apr 7, 2022 · 8 comments

Comments

@davidwallis
Copy link

I'm trying to do this in a server profile

$conn3 = New-OVServerProfileConnection -ConnectionID 3 -ConnectionType FibreChannel -Network Unassigned -PortId "Mezz 3:1-b" -verbose

but I get:

VERBOSE: [NEW-OVSERVERPROFILECONNECTION] Bound PS Parameters:
Key                   Value
---                   -----
ConnectionID              3
ConnectionType FibreChannel
Network          Unassigned
PortId           Mezz 3:1-b
Verbose                True


VERBOSE: [NEW-OVSERVERPROFILECONNECTION] ParameterSetName: Common
VERBOSE: [NEW-OVSERVERPROFILECONNECTION] Called from: New-VMServerProfileTemplate
VERBOSE: [NEW-OVSERVERPROFILECONNECTION] Verify auth
VERBOSE: [TEST-OVAUTH] Caller: New-OVServerProfileConnection
VERBOSE: [TEST-OVAUTH] Verify Auth for redacted.hostname
VERBOSE: [TEST-OVAUTH] $Appliance is [HPEOneView.Appliance.Connection]
VERBOSE: [TEST-OVAUTH] Received HPEOneview.Appliance.Connection Object:
ConnectionID Name                          UserName      AuthLoginDomain Default
------------ ----                          --------      --------------- -------
1            redacted.hostname Administrator LOCAL           True


The property 'id' cannot be found on this object. Verify that the property exists and can be set.
At \\redacted\path\Documents\WindowsPowerShell\Modules\HPEOneView.630\6.30.2928.3678\HPEOneView.630.psm1:112484 char:9
+         $_conn.id = [Int]$connectionId
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'functionType' cannot be found on this object. Verify that the property exists and can be set.
At \\redacted\path\Documents\WindowsPowerShell\Modules\HPEOneView.630\6.30.2928.3678\HPEOneView.630.psm1:112496 char:13
+             $_conn.functionType = [String]$ServerProfileConnectionTyp ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'name' cannot be found on this object. Verify that the property exists and can be set.
At \\redacted\path\Documents\WindowsPowerShell\Modules\HPEOneView.630\6.30.2928.3678\HPEOneView.630.psm1:112500 char:9
+         $_conn.name                = [String]$name
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'portId' cannot be found on this object. Verify that the property exists and can be set.
At \\redacted\path\Documents\WindowsPowerShell\Modules\HPEOneView.630\6.30.2928.3678\HPEOneView.630.psm1:112501 char:9
+         $_conn.portId              = [String]$portId
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'ApplianceConnection' cannot be found on this object. Verify that the property exists and can be set.
At \\redacted\path\Documents\WindowsPowerShell\Modules\HPEOneView.630\6.30.2928.3678\HPEOneView.630.psm1:112502 char:9
+         $_conn.ApplianceConnection = $Network.ApplianceConnection
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound

The property 'networkUri' cannot be found on this object. Verify that the property exists and can be set.
At \\redacted\path\Documents\WindowsPowerShell\Modules\HPEOneView.630\6.30.2928.3678\HPEOneView.630.psm1:112503 char:9
+         $_conn.networkUri          = $Network.uri
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : PropertyNotFound
    
    

any workarounds or is it user error?

@jullienl
Copy link

Instead of ConnectionType FibreChannel, use ConnectionType FC and it will work like:
$conn3 = New-OVServerProfileConnection -ConnectionID 3 -ConnectionType FC -Network Unassigned -PortId "Mezz 3:1-b"

@davidwallis
Copy link
Author

thanks, I tried that:

At Snipped\Documents\WindowsPowerShell\Modules\HPEOneView.630\6.30.2928.3678\HPEOneView.630.psm1:109758 char:26
+                         {$_.Contains($EthernetNetworksUri)}
+                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

You cannot call a method on a null-valued expression.
At Snipped\Documents\WindowsPowerShell\Modules\HPEOneView.630\6.30.2928.3678\HPEOneView.630.psm1:109758 char:26
+                         {$_.Contains($EthernetNetworksUri)}
+                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

New-OVServerProfileTemplate : Bandwidth request (2.5 Gb/s) is not valid for connection 3.
At Snipped.ps1:77 char:5
+     New-OVServerProfileTemplate @serverProfileTemplateParams | Wait-O ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (AsyncronousTask:String) [New-OVServerProfileTemplate], ServerProfileTemplateResourceException
    + FullyQualifiedErrorId : InvalidOperation,New-OVServerProfileTemplate

params for the splat on above are:

$serverProfileTemplateParams = @{
            Name = $name;
            Description = "Server profile template for $($Name) xyz";
            ServerHardwareType = $sht;
            EnclosureGroup = $eg;
            Affinity = "Bay";
            ManageConnections = $True;
            ConnectionsConsistencyChecking = "Minimum";
            Connections = $Conn1, $Conn2, $Conn3, $Conn4;
            ManageBoot = $true;
            BootMode = "UEFIOptimized";
            SecureBoot = "Enabled";
            BootOrder = "SD";
            BootModeConsistencyChecking = "Exact";
            Bios = $true;
            BiosSettings= $biosSettings;
            BiosConsistencyChecking = "Exact";
            ManageIloSettings = $true;
            IloSettingsConsistencyChecking = "Exact";
            IloSettings = $iloSettings;
            HideUnusedFlexNics = $true
    }

@jullienl
Copy link

When a port is unassigned, the cmdlet requires the RequestedBW to be set to 0.
So try to use:
$conn3= New-OVServerProfileConnection -Network unassigned -ConnectionID 5 -ConnectionType FC -PortId "Mezz 3:1-b" -RequestedBW 0

@davidwallis
Copy link
Author

davidwallis commented Apr 20, 2022

thanks that gets it in, however hitting what I think is a bug in the module:

You cannot call a method on a null-valued expression.
At <snip>\WindowsPowerShell\Modules\HPEOneView.630\6.30.2928.3678\HPEOneView.630.psm1:109758
char:26
+                         {$_.Contains($EthernetNetworksUri)}
+                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

@ChrisLynchHPE
Copy link
Member

thanks that gets it in, however hitting what I think is a bug in the module:

You cannot call a method on a null-valued expression.
At <snip>\WindowsPowerShell\Modules\HPEOneView.630\6.30.2928.3678\HPEOneView.630.psm1:109758
char:26
+                         {$_.Contains($EthernetNetworksUri)}
+                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Yes, that is a defect. Both New-OVServerProfile and New-OVServerProfileTemplate do not handle unassigned connections propertly, and will error on that improperly evaluated expression.

@ChrisLynchHPE
Copy link
Member

Also, the validation logic when building the connection helper object omitted FibreChannel that Lionel pointed out.

ChrisLynchHPE added a commit that referenced this issue Jul 18, 2022
…s were causing PowerShell failures.

- [#609] Fixed identification of supported Composer model strings.
- [#606] Fixed New-OVServerProfile and New-OVServerProfileTemplate to handle unassigned connections.
- [#606] Fixed New-OVServerProfileConnection not handling all -ConnectionType types.
- [#587] Fixed ConvertTo-OVPowerShellScript to address mishandling iLO settings in the generated script code.
- [#603] Added support for Alletra6000 and Alletra9000 storage systems to Add-OVStorageSystem and Get-OVStorageSystem Cmdlets.
- [#601] Fixed New-OVServerProfile not handling user defined FC addresses for unmanaged FC connections.
- [#600] Fixed New-OVServerProfileTemplate incorrectly handling unmanaged FC connections and FC storage assignment.
- [#599] Fixed Get-OVServerProfile -Detailed not displaying an assigned baseline correctly.
- [#595] Fixed Show-OVUtilization and [HPEOneView.EnclosureUtilization] class to report current and max power for enclosure resources.
- [#594] Addressed a condition where using Connect-OVMgmt to connect to the same appliance multiple times and additional caller code is to be processed will not. Cmdlet will now display warning message and return back to the caller appropriately.
- [#588] Changed -GroupSID parameter to be mandatory.
- [#587] Fixed ConvertTo-OVPowerShellScript to handle iLO directory settings correctly.
- Updated ConvertTo-OVPowerShellScript to support handling unmanaged connections.
- [#583] Fixed Show-OVFirmwareReport where enclosures with assigned baseline wasn't handled correctly.
- Enhanced New-OVNetwork to support Synergy RoCE network types.
- Added new Cmdlets Get-OVApplianceUpdate, Get-OVApplianceUpdateSchedule and Set-OVApplianceUpdateSchedule.

Signed-off-by: Chris Lynch <chris.lynch@hpe.com>
@ChrisLynchHPE
Copy link
Member

This is fixed in Release 6.30.3188.1900 and in PowerShell Gallery.

Please verify before this issue is closed.

@ChrisLynchHPE
Copy link
Member

Closing due to no further activity. If you wish, feel free to re-open to discuss further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants