microsoft / SCXcore

System Center Cross Platform Provider for Operations Manager
Microsoft Public License
36 stars 31 forks source link

Open port 1270 on install if it was open at uninstall #91

Closed vimish closed 6 years ago

vimish commented 6 years ago

@Microsoft/ostc-devs @narinem

While upgrading omsagent, azure linux extension calls --remove followed by --install, instead of directly calling --upgrade. This sequence was causing port 1270 to close as we close the port on uninstall and do not open it by default on install.

To support this scenario we will now check if port 1270 is open at uninstall. If yes we will create a marker file in scx conf directory. On install if the marker file is present then port 1270 will be opened.

As marker file is created in scx conf directory, it will get deleted in --purge call.

vimish commented 6 years ago

@Microsoft/ostc-devs Moved the port opening logic with new marker file to Linux.data. Please review the new iteration.

vimish commented 6 years ago

@jeffaco I will like to remove the redundant code in another PR. I will try and send it by end of this month. Can you please approve this PR?