-
Notifications
You must be signed in to change notification settings - Fork 60
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
sap_swpm: Execution and monitoring timeouts not aligned #738
Comments
@rob0d I agree with aligning the time, 24 hours is very long-running but I agree with the principle. Regarding your side note, if executing # View files from SUM Observer: https://localhost:1129/lmsl/sumobserver/S01/monitor/index.html
# https://localhost:1129/lmsl/sumobserver/S01/analysis/SUMOBSERVER.XML
# https://localhost:1129/lmsl/sumobserver/S01/analysis/SUMDIALOG.XML
# https://localhost:1129/lmsl/sumobserver/S01/analysis/SAPup_troubleticket.log
# https://localhost:1129/lmsl/sumobserver/S01/analysis/SAPup_troubleticket.zip
# https://localhost:1129/lmsl/sumobserver/S01/analysis/SUMJAVAOBSERVER.XML
# View files from SUM ABAP: https://localhost:1129/lmsl/sumabap/S01/slui/
# /lmsl for LSML API/interface
# https://localhost:1129/lmsl/sumabap/S01/slui/
# https://localhost:1129/lmsl/sumabap/S01/summanifest.mf
# /slp for SL Protocol API/interface
# https://localhost:1129/slp/sumabap/S01/dialogs
# https://localhost:1129/slp/sumabap/S01/metadialogui5
# https://localhost:1129/slp/sumabap/S01/roadmap
# https://localhost:1129/slp/sumabap/S01/actions
# https://localhost:1129/slp/sumabap/S01/monitor
# https://localhost:1129/slp/sumabap/S01/metadata
# https://localhost:1129/slp/sumabap/S01/versions
# https://localhost:1129/slp/sumabap/S01/properties
# https://localhost:1129/slp/sumabap/S01/config
# Define SAP System ID
sap_system_id_upper="S01"
sap_system_id_adm="s01adm"
sap_system_id_adm_password='NewPass$321'
# Retrieve observer file
curl --insecure --user "$sap_system_id_adm":"$sap_system_id_adm_password" https://localhost:1129/lmsl/sumobserver/$sap_system_id_upper/analysis/SUMOBSERVER.XML
# NOTE: the trailing slash is important for authentication realm in the internal browser logic of /slui/
sum_lxml_init=$(
curl "https://localhost:1129/lmsl/sumabap/$sap_system_id_upper/slui/" \
--insecure --location --cookie-jar cookies.log --cookie cookies.log \
--user "$sap_system_id_adm":"$sap_system_id_adm_password")
# Use --verbose mode instead of --head, otherwise error "HTTP/1.1 501 Not Implemented"
# NOTE: use Request Header 'X-CSRF-Token: Fetch' to obtain token for POST - however this may cause no Response payload
sum_slp_csrf_token=$(curl "https://localhost:1129/slp/sumabap/$sap_system_id_upper/config" \
--insecure --location --cookie-jar cookies.log --cookie cookies.log \
--user "$sap_system_id_adm":"$sap_system_id_adm_password" \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'DNT: 1' \
--header 'Connection: keep-alive' \
--header 'Sec-Fetch-Dest: empty' \
--header 'Sec-Fetch-Mode: cors' \
--header 'Sec-Fetch-Site: same-origin' \
--verbose \
--silent \
--header 'X-CSRF-Token: Fetch' \
--header 'X-Requested-With: XMLHttpRequest' \
2>&1 | grep '< X-CSRF-Token' | awk -F ': ' '{print $2}')
sum_slp_config_xml=$(curl "https://localhost:1129/slp/sumabap/$sap_system_id_upper/config" \
--insecure --location --cookie-jar cookies.log --cookie cookies.log \
--user "$sap_system_id_adm":"$sap_system_id_adm_password" \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'DNT: 1' \
--header 'Connection: keep-alive' \
--header 'Sec-Fetch-Dest: empty' \
--header 'Sec-Fetch-Mode: cors' \
--header 'Sec-Fetch-Site: same-origin' \
--header "X-CSRF-Token: $sum_slp_csrf_token" \
--header 'X-Requested-With: XMLHttpRequest')
sum_slp_execute=$(curl "https://localhost:1129/slp/sumabap/$sap_system_id_upper/config" \
--request POST \
--insecure --location --cookie-jar cookies.log --cookie cookies.log \
--user "$sap_system_id_adm":"$sap_system_id_adm_password" \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate, br' \
--header 'DNT: 1' \
--header 'Connection: keep-alive' \
--header 'Sec-Fetch-Dest: empty' \
--header 'Sec-Fetch-Mode: cors' \
--header 'Sec-Fetch-Site: same-origin' \
--compressed \
--header "X-CSRF-Token: $sum_slp_csrf_token" \
--header 'X-Requested-With: XMLHttpRequest' \
--header "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" \
--header 'Accept-Language: en-GB,en;q=0.5' \
--header 'Origin: https://localhost:1129' \
--header "Referer: https://localhost:1129/lmsl/sumabap/$sap_system_id_upper/slui/" \
--data-raw "$sum_slp_config_xml") |
Hi @sean-freeman, I ran SWPM+SUM only once and SWPM got killed by Ansible because the runtime reached the timeout value (I left it over night thinking I have enough time). I was able to finish SUM and I think it needed input twice. |
@rob0d For Phase |
@rob0d Hope that made sense? |
HI Sean. Sorry I didn't get back to you. I was hoping to test it this week, but had issues with the deployment and things got delayed. I am planning to get to try a few times next week and report back. |
Hi @sean-freeman,
So GET works, POST doesn't. |
@rob0d That sounds like the reason why I did not finish that code. At least the first 4 steps worked. I think the POST is what the SLUI "Next" button executes; please forgive me, this was quite a while ago. If you find correct final command, I will make it a priority to append into the |
Hi @sean-freeman,
Both behave in the same way. The steps are identifiable via sumobserver.xml and both do a POST to the config URL. |
Hi @sean-freeman, I had a look at it again and I tried to do another GET to get an updated CSFR token and then do POST, but I am still getting permission denied. I'm not sure if I missed something. However, I have collected network logs from the browser when doing it manually. Would you be able to have a look at them to check if there is anything that can be changed in your script to make it work? |
@rob0d Drop me a msg direct > galaxy.yml#L19 |
@rob0d Drop me an email as above, then we can close this GH Issue ? The outstanding action is irrelevant to the GH Issue itself, and a new GH Issue for tracking it should probably be created |
I am testing SWPM+SUM execution and obviously that's taking a lot longer than the standalone SWPM run.
I have hit an issue that despite the monitoring timeout lines 81-82 which is is effectively set to 60000 seconds (~16 hrs):
However the async execution timeout in line 70 is set to 32400 (9 hrs):
I would suggest to align these two as it failed for me unexpectedly while running SUM despite the monitoring output still showing there are few hours left.
Change the timeout to higher values if SUM execution was enabled? Keep it longer at all times? I think with SUM we need around 24 hours.
The text was updated successfully, but these errors were encountered: