Saturday, November 23, 2019

PS | Automation can be dangerous!

Hi Folks,

Everyone loves automation. It is very exciting to see that operations is happening automatically. But it will not take much to convert from excitement to graveyard regret if not executed in correctly or in a perfect manner.

I would like to share one example where we were in process of upgrading all NSX edges. As per plan, we selected around 100 edges to upgrade first and then we had to wait for further approval and all.

So we picked the powershell command and executed for those 100 edges. Command is very simple and one liner command. Nothing complex in that but.....

A blank enter key created mess. Let's see how!

Check the command first

In that command, there is source file which is saved with .txt extension. In that file, edge ids needs to be mentioned. isn't it? Then execute the script.

Very simple :)

but what ruin the task is, in that .txt file, edge were mentioned like

edge1
edge2
edge3
.
.
.
and so on and nothing wrong.
But in last row, there was a blank enter after last edge ID.

Script was taking this as an object "ALL" and executed the upgrade action on all other edges as well which were not in that .txt file.LOL!

What a mistake and what a mess!!

Solution is either don't give a blank enter or use .csv file rather than .txt file whenever giving source to an PS script.

Be careful guys. It is operations....LOL.




Thank you,
Team vCloudNotes

0 comments:

Post a Comment

Sponsor

AD BANNER
Powered by Blogger.
The Magazine

Text Widget

Facebook

Extra Ads

AD BANNER

Welcome to my Notes!

Hello Folks, My name is Gautam Johar. Actively working on VMware Cloud and keen to learn new and latest cloud technologies in market. Love ...

Contact Form

Name

Email *

Message *

Followers



Labels

Translate

Breaking

Random Posts

Follow Us

On Linkedin

Recent Posts

Recent Comments

Header Ads

Popular Posts

Popular Posts

Recent Posts

Text Widget

Search This Blog

Copyright © test blog | Powered by Blogger
Design by Saeed Salam | Blogger Theme by NewBloggerThemes.com