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

Install-ContainerHost.ps1 may fail in Wait-InstalledContainerImage #161

Closed
mikejhill opened this issue Mar 7, 2016 · 1 comment
Closed

Comments

@mikejhill
Copy link

On line 1032, $timeElapsed = $(Get-Date) - $startTime may throw an exception when the constraint $newBaseImages.count -neq 0 is not immediately satisfied. This is caused by $startTime not being assigned.

We were able to work around this issue by making the following modification on line 1028:

  $newBaseImages = Get-InstalledContainerImage $BaseImageName
+ $startTime = Get-Date
  while ($newBaseImages.Count -eq 0)

Original encountered exception:

C:\Install-ContainerHost.ps1 : Cannot find an overload for "op_Subtraction" and the argument count: "2".
At line:1 char:1
+ C:\Install-ContainerHost.ps1 -PSDirect -NATSubnetPrefix 172.16.0.0/24 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-ContainerHost.ps1
@mebersol
Copy link
Contributor

mebersol commented Mar 9, 2016

Fixed with 27c5563

@mebersol mebersol closed this as completed Mar 9, 2016
neilpeterson pushed a commit that referenced this issue Apr 27, 2016
Workaround issue with Nano and PSDirect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants