Skip to content

qa: manual upgrade from n-1/n-2 to main#56476

Merged
vshankar merged 2 commits intoceph:mainfrom
dparmar18:manual-upgrade-tests
Jun 27, 2024
Merged

qa: manual upgrade from n-1/n-2 to main#56476
vshankar merged 2 commits intoceph:mainfrom
dparmar18:manual-upgrade-tests

Conversation

@dparmar18
Copy link
Contributor

@dparmar18 dparmar18 commented Mar 26, 2024

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows
  • jenkins test rook e2e

@github-actions github-actions bot added the cephfs Ceph File System label Mar 26, 2024
@dparmar18
Copy link
Contributor Author

since im stuck with lua related issues in #56338, ive created this one. i hope to resolve issues in #56338 ASAP.

@dparmar18 dparmar18 requested a review from a team March 26, 2024 11:39
@dparmar18 dparmar18 force-pushed the manual-upgrade-tests branch from 6c1b3c1 to 01ed537 Compare March 26, 2024 11:56
Copy link
Member

@batrick batrick left a comment

Choose a reason for hiding this comment

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

what about the other sub-suites in fs:upgrade?

@dparmar18
Copy link
Contributor Author

what about the other sub-suites in fs:upgrade?

Okay, this will require changes to upgrade YAMLs in all the sub-suites along with re-organising them. I'll make the required changes.

@dparmar18 dparmar18 force-pushed the manual-upgrade-tests branch 11 times, most recently from 3c2b40c to db94dd2 Compare April 4, 2024 08:16
@dparmar18 dparmar18 marked this pull request as draft April 4, 2024 08:21
@dparmar18 dparmar18 force-pushed the manual-upgrade-tests branch 6 times, most recently from 1581b79 to 14dfe38 Compare April 4, 2024 12:29
@leonid-s-usov
Copy link
Contributor

@dparmar18, how temporary is this submission, given that there's #56338? Are you going to revert this one eventually?

In both cases, especially in #56338, I have a problem with such complicated logic in a lua script in a yaml string, it's hard to debug and maintain. Isn't there a way to code the logic in Python?

teuthology:
premerge: |
local branch = yaml.teuthology.branch
yaml_fragment['meta'][0]['desc'] = "install ceph/" .. tostring(branch) .. " latest"
Copy link
Contributor

Choose a reason for hiding this comment

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

here and in other similar expressions, I find using explicit array indices into the yaml arrays error-prone. One will have to update all indices if another print task is inserted at the start, or the task order is changed.

I'd love to see some unique placeholder values being found and replaced, or at least using the search to find the task with a given name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

here and in other similar expressions, I find using explicit array indices into the yaml arrays error-prone. One will have to update all indices if another print task is inserted at the start, or the task order is changed.

well that is true, but given the limitations we have with lua injected in YAMLs https://docs.ceph.com/projects/teuthology/en/latest/fragment_merging.html, I'm not sure how can we achieve this, maybe @batrick (since he wrote this code) can add throw some light here, or we can brute force this by running a loop to search for the placeholders? what do you think?

I'd love to see some unique placeholder values being found and replaced, or at least using the search to find the task with a given name

Copy link
Contributor

@leonid-s-usov leonid-s-usov Apr 4, 2024

Choose a reason for hiding this comment

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

well, yes, at least you can add a lua function that searches for and replaces a string with another object. Once you have that well tested, I'd suggest that you added it to teuthology/suite/fragment-merge.lua.

Another approach that's really a PR on its own would be to allow referencing lua functions from inside the yaml values with some general syntax, roughly

value_from_lua:
   script: "evaluated + by + the + same + lua + context + as + premerge"

the latter would be handy, as the premerge could then declare a bunch of global vars that this script could reference, or call functions from the premerge script.

Copy link
Contributor

Choose a reason for hiding this comment

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

There is another thing we should consider, which is YAML's anchors and references. Also, there's tagging to create python objects, which we could also employ.

Copy link
Contributor Author

@dparmar18 dparmar18 Apr 5, 2024

Choose a reason for hiding this comment

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

I understand the possibilities of improvement here, but AFAIU these changes are high prio, patrick and venky have been waiting since long to get this so that we can start testing n-1|n-2 -> main. I'm fine either way, it's your, @vshankar or @batrick's call finally. Do let me know with what approach you guys think we should move forward with, so that I can plan things out accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another approach would be to (since the aim is to move to dynamic pulling of releases) move ahead with these changes as it is and work on #56338, where I see @leonid-s-usov 's suggestions coming in. If we're successful in having that PR work then we might not need to have the search func

Copy link
Contributor

Choose a reason for hiding this comment

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

I am fine with this code if we know that it's temporary and will be reverted with the solution from #56338

@dparmar18
Copy link
Contributor Author

@dparmar18, how temporary is this submission, given that there's #56338? Are you going to revert this one eventually?

In both cases, especially in #56338, I have a problem with such complicated logic in a lua script in a yaml string, it's hard to debug and maintain. Isn't there a way to code the logic in Python?

So the solution you see in #56338 suffered setback because setting up the lua env to run that script infused YAML is complicated which I discussed in today's standup, that patch will be converted to what @batrick suggested - run through the ceph git tree in teuthology code (python) which I still need to figure out how and then fetch the file ceph_release.h; grep the latest version and feed the YAML, this should significantly reduce the complexity of the logic.

@leonid-s-usov
Copy link
Contributor

leonid-s-usov commented Apr 4, 2024

(moved the comment to #56338 (comment))

@dparmar18 dparmar18 force-pushed the manual-upgrade-tests branch from d0aa196 to b351a09 Compare April 8, 2024 11:13
@vshankar
Copy link
Contributor

This PR is under test in https://tracker.ceph.com/issues/66090.

@dparmar18 dparmar18 force-pushed the manual-upgrade-tests branch from 1019009 to 1cea3ae Compare May 29, 2024 10:16
@github-actions github-actions bot added the tests label May 29, 2024
Copy link
Member

@batrick batrick left a comment

Choose a reason for hiding this comment

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

otherwise lgtm

@dparmar18 dparmar18 force-pushed the manual-upgrade-tests branch 2 times, most recently from cf9339d to 8aff1f0 Compare May 30, 2024 17:15
@dparmar18 dparmar18 requested a review from vshankar May 30, 2024 17:37
@dparmar18 dparmar18 force-pushed the manual-upgrade-tests branch from 8aff1f0 to 6b955a0 Compare May 31, 2024 08:36
@dparmar18
Copy link
Contributor Author

@anthonyeleven
Copy link
Contributor

jenkins retest this please

@vshankar
Copy link
Contributor

vshankar commented Jun 3, 2024

This PR is under test in https://tracker.ceph.com/issues/66327.

@anthonyeleven
Copy link
Contributor

When merged I'll follow-up PR a host of minor doc nits, I don't want to subject you to those ;)

@vshankar vshankar mentioned this pull request Jun 12, 2024
14 tasks
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
@dparmar18 dparmar18 force-pushed the manual-upgrade-tests branch from 6b955a0 to 53f18ef Compare June 13, 2024 13:18
@vshankar
Copy link
Contributor

This PR is under test in https://tracker.ceph.com/issues/66522.

Copy link
Contributor

@vshankar vshankar left a comment

Choose a reason for hiding this comment

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

@vshankar
Copy link
Contributor

jenkins retest this please

@vshankar vshankar merged commit 086c282 into ceph:main Jun 27, 2024
@vshankar
Copy link
Contributor

Nice work @dparmar18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants