CLOUDSTACK-10140: Fix for when template is created from snapshot template.properties are corrupted#2322
Conversation
|
@bwsw can you provide more details about this issue? I have some doubts here, for instance in |
|
Hi, @rafaelweingartner https://github.com/apache/cloudstack/pull/2320/files#diff-71901db20e3d4adb6711e69c1c1ca2ba it was found by @rhtyd and I fixed Id from 1 to actual code. I don't include it into PR because master already includes it. Next I went to debugging and opened the issue (CLOUDSTACK-10140) you saw in Jira. ID is fixed by code from 1st diff, but other information is incorrect including size (I don't see it in my snippet but AFAIK "size" field was incorrect and included something like UUID-like with "-"). Next, https://issues.apache.org/jira/secure/ViewProfile.jspa?name=weizhou user provided the patch and everything started to work fine. Might be the problem in buffered IO which leads to corrupted data? Closing of try leads to sync and processor is able to append correctly? Frankly speaking, I didn't dive into details and it's a shame but It takes a lot of time to move across all the ACS code, because I'm not a "real" java developer. But this patch really works. I patched the 4.10, compiled, deployed into Agent, recreated SSVM and templates started to work properly. Basically, I recommend to consult Wei Zhou about his patch. |
|
Thanks for the information. |
|
@rafaelweingartner yes. We had this issue a year ago and fixed it by the patch I posted. In short, the template.properties should be saved before going to the next step. |
|
@ustcweizhou thanks! |
rafaelweingartner
left a comment
There was a problem hiding this comment.
Well, the code seems to be ok.
The classes that are being changes need a little bit of love.. but that is the case for some other PR.
LGTM
|
@bwsw do a |
|
@bwsw your rebase did not work because you applied a rebase on a merge that you had already done previously, right? It is easier to checrry-pick the first two commits on top of a clean master branch of yours and then push it here. |
Conflicts: services/secondary-storage/server/src/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java
|
@rhtyd done |
| bufferWriter.write("filename=" + fileName); | ||
| bufferWriter.write("\n"); | ||
| long size = _storage.getSize(destFileFullPath); | ||
| bufferWriter.write("size=" + size); |
There was a problem hiding this comment.
@bwsw should we not write size? Is it because, we're going to save size at line 560/556?
|
LGTM |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1306 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1702)
|
|
Lgtm, ignoring intermittent known failures. |
No description provided.