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

[MANOPD-68698] Fix check_iaas procedure when cluster is not installed #139

Merged
merged 7 commits into from
Jun 3, 2022

Conversation

ilia1243
Copy link
Contributor

@ilia1243 ilia1243 commented Apr 5, 2022

Description

  1. When cluster is not installed, check_iaas might fail, but succeed after cluster installation.
  2. When cluster is installed, check_iaas does not fail, but tries to connect to services listening predefined ports (for example, 80, 6443)

Solution

  • socat utility might be not installed before cluster installation. Simple custom tcp listener that can be run on python 2 or 3 is used instead of socat.
  • If firewalld service is enabled in any node, temporarily stop the service. The fact that it should be disabled, is checked by check_paas procedure by services.security.firewalld.status task.
  • check_iaas now checks that ports and subnet can be already in use on some nodes. Such nodes are skipped from connectivity check with warnings.

Test Cases

TestCase 1

Test Configuration:

  • Hardware: clean VMs with not install socat package on nodes, or with enabled firewalld service.

Steps:

  1. Run check_iaas.

Results:

Before After
network tasks fail network tasks succeed

TestCase 2

Test Configuration:

  • Any installed cluster

Steps:

  1. Run check_iaas.

Results:

Before After
network.check_tcp_ports does not fail network.check_tcp_ports is skipped with warnings, because some ports are in use

Checklist

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Integration CI passed
  • Unit tests. If Yes list of new/changed tests with brief description
  • There is no merge conflicts

Reviewers

@koryaga @iLeonidze @Zaborin @alexarefev @Yaroslav-Lahtachev @dmyar21

@ilia1243 ilia1243 added the bug Something isn't working label Apr 5, 2022
@koryaga koryaga requested a review from n549 April 6, 2022 08:22
@ilia1243 ilia1243 changed the title [MANOPD-68698] Fix check_iaas procedure when cluster is not installed WIP [MANOPD-68698] Fix check_iaas procedure when cluster is not installed Apr 6, 2022
@ilia1243 ilia1243 marked this pull request as draft April 6, 2022 13:05
@ilia1243 ilia1243 changed the title WIP [MANOPD-68698] Fix check_iaas procedure when cluster is not installed [MANOPD-68698] Fix check_iaas procedure when cluster is not installed Apr 6, 2022
@ilia1243 ilia1243 marked this pull request as ready for review April 7, 2022 13:26
@ilia1243 ilia1243 marked this pull request as draft April 18, 2022 09:06
@ilia1243 ilia1243 added the draft label Apr 18, 2022
ilia1243 and others added 4 commits April 19, 2022 16:42
* Simple custom tcp listener written in python 2 is used instead of socat.
* If firewalld service is enabled in any node, temporarily stop the service. The fact that it should be disabled, is checked by check_paas procedure by services.security.firewalld.status task.
Exclude balancer nodes from check subnet connectivity.
Added autodetection of preinstalled python executable.
@ilia1243 ilia1243 force-pushed the bugfix/check_iaas_not_installed branch from 78a4da3 to e0af982 Compare April 19, 2022 13:46
ilia1243 and others added 3 commits April 19, 2022 19:31
1. Added gentle alias creating for subnets on installed cluster.
2. Fixed bugs in RemoteExecutor related to exception handling and merging results.
1. Added gentle tcp listener installation and checking for already listening ports.
@ilia1243 ilia1243 removed the draft label Apr 21, 2022
@ilia1243 ilia1243 marked this pull request as ready for review April 21, 2022 14:13
Copy link
Collaborator

@andrewluckyguy andrewluckyguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested by QA for Centos and Ubuntu:

  • on clean VMs
  • on deployed cluster

@koryaga koryaga merged commit 67e4148 into main Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants