bosh-init icon indicating copy to clipboard operation
bosh-init copied to clipboard

Add extra validations to bosh-init manifest: cloud_provider.mbus and cloud_provider.agent.mbus properties should user https protocol and have the same creds and ports

Open allomov opened this issue 8 years ago • 9 comments

Hey, all.

This PR add validations to prevent two a common errors that are not so easy to debug for a newcomer.

The first problem is that bosh-agent does not expect having http as mbus protocol, so it simply skips connecting to mbus. This means that mbus properties should always have https protocol.

The second error is typos in passwords/usernames/ports of mbus parameters. This PR adds checks if this properties are similar in mbus URLs in cloud_properties.mbus and cloud_properties.properties.agent.mbus.

What do you think on this changes?

allomov avatar Apr 19 '16 11:04 allomov

Hey allomov!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

cfdreddbot avatar Apr 19 '16 11:04 cfdreddbot

@allomov unfortunately not all CPIs define that property, so we cant really rely that agent.mbus is there. may be make that check conditional on the property presence?

cppforlife avatar Apr 27 '16 17:04 cppforlife

@cppforlife thank you for the valuable update. I will add it now.

allomov avatar Apr 28 '16 12:04 allomov

@cppforlife as far as I understand, cloud_provider.mbus is a required field. Could you confirm it's true?

allomov avatar Apr 28 '16 13:04 allomov

@allomov yup that one is required.

cppforlife avatar May 02 '16 17:05 cppforlife

@cppforlife I've updated the brunch to follow your comments.

allomov avatar May 04 '16 15:05 allomov

@allomov Cool. Thanks.

cppforlife avatar May 05 '16 02:05 cppforlife

PR sounds useful, although I haven't personally hit the cases where it's trying to help. Only thing that stands out to me is we should probably say "must" instead of "should" since the user has no option but to comply with the errors it raises, à la RFC 2119.

I think there's some upcoming work in bosh-init planned. It'll probably be easier for a pair to merge this during/after that effort once we've built up context in this repo again.

dpb587-pivotal avatar Jun 08 '16 15:06 dpb587-pivotal

@dpb587-pivotal thank you for the response. I've merge latest develop into the branch and changed error messages.

allomov avatar Jun 09 '16 11:06 allomov