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

Add support for user prompt to select the JSON file when the management shutdown script is relaunched and SDDC Manager is already shut down #50

Open
4 tasks done
tenthirtyam opened this issue Jul 26, 2023 · 4 comments
Assignees
Labels
backlog Backlog enhancement Enhancement
Milestone

Comments

@tenthirtyam
Copy link
Contributor

Code of Conduct

  • I have read and agree to the project's Code of Conduct.
  • Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
  • Do not leave "+1" or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

Observed this message when SDDC Manager is powered off be the script and there is an issue encountered after SDDC manager is down. Here the script exit with an error message while it is trying to make a connection to an ESXi host.

[04-26-2022_08_43_45] Beginning of Log File
[04-26-2022_08:43:45] INFO Script used: C:\Users\Administrator\Desktop\shutdown and startup\shutdownandstartup\SampleScripts\PowerManagement-ManagementDomain.ps1 
[04-26-2022_08:43:45] INFO Script syntax: -server sddcmanager.rainpole.local -user [administrator@vsphere.local](mailto:administrator@vsphere.local) -pass ******* -powerState Startup
[04-26-2022_08:43:45] INFO Setting up the log file to path C:\Users\Administrator\Desktop\shutdown and startup\shutdownandstartup\SampleScripts\logs\PowerManagement-ManagementDomain.ps1-04-26-2022_08_43_45.log
[04-26-2022_08:43:46] INFO Required version of Posh-SSH found on the system
[04-26-2022_08:43:46] INFO Setting up the log file to path C:\Users\Administrator\Desktop\shutdown and startup\shutdownandstartup\SampleScripts\logs\PowerManagement-ManagementDomain.ps1-04-26-2022_08_43_45.log
[04-26-2022_08:43:46] INFO Gathering System Details from json file
[04-26-2022_08:43:46] INFO Starting run of Set-MaintenanceMode cmdlet
[04-26-2022_08:43:46] INFO Attempting to connect to server 'esx1.rainpole.local'
[04-26-2022_08:43:47]   Error at Script Line 328
[04-26-2022_08:43:47]   Relevant Command: Connect-VIServer -Server $server -Protocol https -User $user -Password $pass | Out-Null
[04-26-2022_08:43:47]   Error Message: The 'Connect-VIServer' command was found in the module 'VMware.VimAutomation.Core', but the module could not be loaded. For more information, run 'Import-Module VMware.VimAutomation.Core'.
[04-26-2022_08:43:47] INFO Finishing run of Set-MaintenanceMode cmdlet
[04-26-2022_08:43:47]   Error at Script Line 384
[04-26-2022_08:43:47]   Relevant Command: Debug-CatchWriterForPowerManagement -object $_
[04-26-2022_08:43:47]   Error Message: The 'Connect-VIServer' command was found in the module 'VMware.VimAutomation.Core', but the module could not be loaded. For more information, run 'Import-Module VMware.VimAutomation.Core'.

When script is launched again, it tries to fetch SDDC Manager though it is down.

Would you like to gracefully shutdown customer deployed Virtual Machines not managed by SDDC Manager (Yes/No)? [No]:

Have you deployed a Standalone Workspace ONE Access instance (Yes/No):

Kindly provide space separated list of Virtual Machine names for NSX-T edge nodes. (Enter for none):
 [04-26-2022_15:06:00] WARNING No Edge nodes have been provided!
 [04-26-2022_15:06:00] INFO Script used: C:\Users\Administrator\Desktop\shutdown and startup\shutdownandstartup\SampleScripts\PowerManagement-ManagementDomain.ps1
 [04-26-2022_15:06:00] INFO Script syntax: -server sddcmanager.rainpole.local -user [administrator@vsphere.local](mailto:administrator@vsphere.local) -pass ******* -powerState Shutdown
 [04-26-2022_15:06:00] INFO Setting up the log file to path C:\Users\Administrator\Desktop\shutdown and startup\shutdown
andstartup\SampleScripts\logs\PowerManagement-ManagementDomain.ps1-04-26-2022_03_06_00.log
 [04-26-2022_15:06:00] INFO Process WILL NOT gracefully shutdown customer deployed Virtual Machines not managed by VCF running if deployed within the Management Domain
 [04-26-2022_15:06:03] INFO Required version of Posh-SSH found on the system
C:\Users\Administrator\Desktop\shutdown and startup\shutdownandstartup\SampleScripts\PowerManagement-ManagementDomain.ps1 : Unable to communicate with SDDC Manager (sddcmanager.rainpole.local), check fqdn/ip address
At line:1 char:1
+ .\PowerManagement-ManagementDomain.ps1 -server "sddcmanager.rainpole. ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,PowerManagement-ManagementDomain.ps1

As per documentation, it is manual after that.

During shutdown of the management domain if SDDC Manager is already stopped the only option is to continue
with manual steps, following VMware Cloud Foundation documentation.

Use Case(s)

Add support for user prompt to select the JSON file when the management shutdown script is relaunched and SDDC Manager is already shut down.

Potential Configuration

Would be good if it prompts user to select the JSON file like how it performs for startup.

References

No response

@tenthirtyam tenthirtyam added the enhancement Enhancement label Jul 26, 2023
@tenthirtyam tenthirtyam added this to the Backlog milestone Jul 26, 2023
@github-actions github-actions bot added the pending-review Pending Review label Jul 26, 2023
@tenthirtyam tenthirtyam removed the pending-review Pending Review label Jul 26, 2023
@github-actions
Copy link

'Marking this issue as stale due to inactivity. This helps us focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context.
Thank you!'

@github-actions github-actions bot added the stale stale label Sep 25, 2023
@tenthirtyam tenthirtyam added backlog Backlog and removed stale stale labels Sep 26, 2023
Copy link

'Marking this issue as stale due to inactivity. This helps us focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context.
Thank you!'

@github-actions github-actions bot added the stale stale label Nov 26, 2023
@tenthirtyam tenthirtyam removed the stale stale label Nov 27, 2023
Copy link

'Marking this issue as stale due to inactivity. This helps us focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context.
Thank you!'

@github-actions github-actions bot added the stale stale label Jan 27, 2024
@tenthirtyam tenthirtyam removed the stale stale label Feb 7, 2024
@burnsjared0415
Copy link
Contributor

why use a json, why not just put in a option to skip the SDDC manager if it is done through a question?

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

No branches or pull requests

3 participants