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

ENT-11526: Changed mission-portal apache restart to graceful to minimize service interruptions #2864

Merged
merged 1 commit into from
Apr 12, 2024

Conversation

craigcomstock
Copy link
Contributor

@craigcomstock craigcomstock commented Apr 4, 2024

In our CI system deployment tests we go through test steps quickly.
Fairly often the apache config is updated by policy and a restart is initiated.
By changing to apachectl graceful we should avoid some of the server availability during tests problems we have been seeing.

Ticket: ENT-11526
Changelog: title

with cfengine/core#5480

@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins please, thanks.

@craigcomstock craigcomstock marked this pull request as draft April 4, 2024 21:37
@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

bootstrap-tests is a known issue fixed for ENT-8264 in https://github.com/cfengine/mission-portal/pull/2321

98-delete-project failure

6	:	1712282346.958	     0.460	0	0	22	0	curl -k -i --show-error --fail -u admin:admin -H "content-type: application/json" -X DELETE https://54.216.44.96/api/build/projects/1 && echo

is a bit like what I was trying to fix but in this case it is a 500 error which would not be solved by a graceful restart of apache.

54.216.44.96	  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
54.216.44.96	                                 Dload  Upload   Total   Spent    Left  Speed
54.216.44.96	
54.216.44.96	  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
54.216.44.96	  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
54.216.44.96	curl: (22) The requested URL returned error: 500 Internal Server Error

Will check if there is another ticket for 500 errors during this test.

@craigcomstock
Copy link
Contributor Author

craigcomstock commented Apr 5, 2024

have organized tickets and made one common ticket for 500 errors related to failed to open stream, permission denied, dispatch.php, vendor/autoload.php etc... ENT-11182

@craigcomstock craigcomstock marked this pull request as ready for review April 5, 2024 21:32
@craigcomstock
Copy link
Contributor Author

@cf-bottom jenkins please, now with a core change to add ExecReload using apachectl graceful to core systemd units.

@cf-bottom
Copy link

Copy link
Member

@nickanderson nickanderson left a comment

Choose a reason for hiding this comment

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

I can see how this might make sense. I would be concerned that graceful is aysnc and then after the promise runs we wouldn't be in the expected state until some undetermined period of time later.

cfe_internal/enterprise/mission_portal.cf Show resolved Hide resolved
Copy link
Contributor

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

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

Makes sense. 👍

@craigcomstock
Copy link
Contributor Author

Looks like many platforms didn't have httpd running during bootstrap-tests restart test and sequential-tests during upgrades showed an error that may indicate why:

3.249.208.255	Failed to start cf-apache.service: Unit cf-apache.service is not loaded properly: Exec format error.

Will check it out.

… interruptions

In our CI system deployment tests we go through test steps quickly.
Fairly often the apache config is updated by policy and a restart is initiated.
By changing to apachectl graceful we should avoid some of the server availability during tests problems we have been seeing.

Ticket: ENT-11526
Changelog: title
@craigcomstock
Copy link
Contributor Author

typo in core, fixed, @cf-bottom jenkins retry please.

@cf-bottom
Copy link

@craigcomstock
Copy link
Contributor Author

rhel-9 hub in 99-cfbs-init test said

54.74.76.234	curl: (22) The requested URL returned error: 500 Internal Server Error

Looking in support tarball and var/cfengine/httpd/logs/error_log I think this is a known issue

[Thu Apr 11 23:41:58.598136 2024] [php:warn] [pid 58068] [client 91.232.32.37:46788] PHP Warning:  Unknown: Failed to open stream: Permission denied in Unknown on line 0
[Thu Apr 11 23:41:58.598753 2024] [php:error] [pid 58068] [client 91.232.32.37:46788] PHP Fatal error:  Failed opening required '/var/cfengine/httpd/htdocs/api/dispatch.php' (include_path='.:') in Unknown on line 0

Known issue: https://northerntech.atlassian.net/browse/ENT-11182


Selenium failure: InventoryTest::testExcludeIncludeFilter, looks like a timing fluke in selenium test to me. Logged a ticket: https://northerntech.atlassian.net/browse/ENT-11546

@craigcomstock craigcomstock merged commit 8a89103 into cfengine:master Apr 12, 2024
39 of 40 checks passed
@craigcomstock craigcomstock deleted the ENT-11526/master branch April 12, 2024 15:01
@craigcomstock
Copy link
Contributor Author

Will wait to cherry pick for a week or so to see how/if this improves our CI. Will set a reminder for myself for 2024-04-19.

@craigcomstock craigcomstock added the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label Apr 12, 2024
@craigcomstock craigcomstock removed the cherry-pick? Fixes which may need to be cherry-picked to LTS branches label May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants