mgr/cephadm: Prevent unnecessary SSH reconfiguration#36492
Conversation
tchaikov
left a comment
There was a problem hiding this comment.
could you prefix the title of your commit message with the subcomponent your are changing ? see https://github.com/ceph/ceph/blob/master/SubmittingPatches.rst#3-describe-your-changes
3349dfd to
00e71d3
Compare
Fixed, thanks. |
mgfritch
left a comment
There was a problem hiding this comment.
also extend this to set-ssh-config?
ceph/src/pybind/mgr/cephadm/module.py
Lines 742 to 746 in 9809c18
When 'set-user', 'set-pub-key' or 'set-priv-key' are called two times with the same value, we can ignore the second call. Signed-off-by: Ricardo Marques <rimarques@suse.com>
00e71d3 to
4cbf587
Compare
@mgfritch I've implemented the same behaviour on I've also changed the message to make it more clear that SSH is not reconfigured because the value has not changed. |
| if ssh_config_fname: | ||
| self.validate_ssh_config_fname(ssh_config_fname) | ||
| ssh_options += ['-F', ssh_config_fname] | ||
| self.ssh_config = ssh_config |
When
set-user,set-pub-keyorset-priv-keyare called "two" times with the same value, we can ignore the "second" call:This will prevent unnecessary SSH reconfiguration and connections reset.
Signed-off-by: Ricardo Marques rimarques@suse.com
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox