mlsorensen opened a new pull request, #7948:
URL: https://github.com/apache/cloudstack/pull/7948
### Description
This PR allows the direct download timeout configurations to apply to the
URL check during registerTemplate.
There is already support in the Downloader classes for these configurations
for the actual download of templates, and the ConfigKeys already exist, so just
needed to pass these in the CheckUrlCommand
### Types of changes
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] Enhancement (improves an existing feature and functionality)
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
### Feature/Enhancement Scale or Bug Severity
#### Feature/Enhancement Scale
- [ ] Major
- [x] Minor
#### Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [x] Minor
- [ ] Trivial
### Screenshots (if appropriate):
### How Has This Been Tested?
Tested locally, confirmed config items are passed along.
mgmt server:
```
2023-09-06 14:41:09,340 DEBUG [c.c.a.m.ClusteredAgentAttache]
(qtp1911152052-21:ctx-09dfd07c ctx-600dfd34) (logid:1083f2be) (extid:) Seq
43-7668222790528401454: Forwarding Seq 43-7668222790528401454: { Cmd , MgmtId:
31239355356821, via: 43(kvmlab2), Ver: v1, Flags: 100011,
[{"org.apache.cloudstack.agent.directdownload.CheckUrlCommand":{"format":"QCOW2","url":"https://download.fedoraproject.org/pub/fedora/linux/releases/37/Cloud/x86_64/images/Fedora-Cloud-Base-37-1.7.x86_64.qcow2","connectTimeout":"7000","connectionRequestTimeout":"5000","socketTimeout":"8000","wait":"0","bypassHostMaintenance":"false"}}]
} to 5074163034
2023-09-06 14:41:11,405 DEBUG [c.c.a.t.Request]
(AgentManager-Handler-8:null) (logid:) (extid:) Seq 43-7668222790528401454:
Processing: { Ans: , MgmtId: 31239355356821, via: 43, Ver: v1, Flags: 10,
[{"org.apache.cloudstack.agent.directdownload.CheckUrlAnswer":{"templateSize":"(5.00
GB) 5368709120","result":"true","wait":"0","bypassHostMaintenance":"false"}}] }
```
hypervisor:
```
2023-09-06 14:41:09,385 DEBUG [cloud.agent.Agent]
(agentRequest-Handler-4:null) (logid:1083f2be) Request:Seq
43-7668222790528401454: { Cmd , MgmtId: 31239355356821, via: 43, Ver: v1,
Flags: 100011,
[{"org.apache.cloudstack.agent.directdownload.CheckUrlCommand":{"format":"QCOW2","url":"https://download.fedoraproject.org/pub/fedora/linux/releases/37/Cloud/x86_64/images/Fedora-Cloud-Base-37-1.7.x86_64.qcow2","connectTimeout":"7000","connectionRequestTimeout":"5000","socketTimeout":"8000","wait":"0","bypassHostMaintenance":"false"}}]
}
2023-09-06 14:41:09,386 DEBUG [cloud.agent.Agent]
(agentRequest-Handler-4:null) (logid:1083f2be) Processing command:
org.apache.cloudstack.agent.directdownload.CheckUrlCommand
2023-09-06 14:41:09,386 INFO [resource.wrapper.LibvirtCheckUrlCommand]
(agentRequest-Handler-4:null) (logid:1083f2be) Checking URL:
https://download.fedoraproject.org/pub/fedora/linux/releases/37/Cloud/x86_64/images/Fedora-Cloud-Base-37-1.7.x86_64.qcow2,
with connect timeout: 7000, connect request timeout: 5000, socket timeout: 8000
2023-09-06 14:41:11,404 DEBUG [cloud.agent.Agent]
(agentRequest-Handler-4:null) (logid:1083f2be) Seq 43-7668222790528401454: {
Ans: , MgmtId: 31239355356821, via: 43, Ver: v1, Flags: 10,
[{"org.apache.cloudstack.agent.directdownload.CheckUrlAnswer":{"templateSize":"(5.00
GB) 5368709120","result":"true","wait":"0","bypassHostMaintenance":"false"}}] }
```
Updated unit tests to use the new constructor.
<!-- Please read the
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md)
document -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]