Skip to content

Conversation

@Ostrokrzew
Copy link
Contributor

Two variants:

  • cache before upgrade doesn't contain attached cores
  • cache before upgrade does contain many attached cores

Waits for patches #391 and #440

@pep8speaks
Copy link

pep8speaks commented Jul 30, 2020

Hello @Ostrokrzew! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-07-31 09:54:00 UTC

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
…cores

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
@Ostrokrzew Ostrokrzew marked this pull request as ready for review August 13, 2020 11:37
from test_utils.size import Size, Unit

cache_size = Size(1, Unit.GiB)
cache_modes_amount = len(set(list(CacheMode.__members__.values())))
Copy link
Contributor

Choose a reason for hiding this comment

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

len(CacheMode) should be enough (it doesn't count DEFAULT as separate entry)

@pytest.mark.require_disk("cache", DiskTypeSet([DiskType.optane, DiskType.nand]))
def test_module_usage_counter_without_cores():
"""
title: Validate OpenCAS module used by counter, no cores.
Copy link
Contributor

Choose a reason for hiding this comment

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

The title is quite ambiguous. Sounds like validating a module which is used by a counter. If 'module used by' is a name of a counter, then do what I just did - put it in ' '.

pass_criteria:
- Cannot remove OpenCAS kernel modules when usage counter is not 0.
- OpenCAS increase and decrease cas_cache usage counter.
- OpenCAS usage counter is equal to amount of caches.
Copy link
Contributor

Choose a reason for hiding this comment

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

'number' instead of 'amount' ('amount' is for uncountable nouns)

after starting many cache instances (one for each cache mode) without adding cores.
pass_criteria:
- Cannot remove OpenCAS kernel modules when usage counter is not 0.
- OpenCAS increase and decrease cas_cache usage counter.
Copy link
Contributor

Choose a reason for hiding this comment

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

Adding/removing caches increases/decreases...

Comment on lines +169 to +173
installer.set_up_opencas()
original_commit = git.get_current_commit_hash(from_dut=True)

installer.uninstall_opencas()
installer.set_up_opencas(cas_version_to_upgrade)
Copy link
Contributor

Choose a reason for hiding this comment

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

as above

Comment on lines +238 to +244
installer._clean_opencas_repo()
git.checkout_cas_version(original_commit)
try:
upgrade_in_flight.upgrade_start()
except CmdException:
restore_pretest_state(original_commit)
TestRun.fail("Upgrade failed!")
Copy link
Contributor

Choose a reason for hiding this comment

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

as above

Comment on lines +266 to +267
unload_kernel_module(CasModule.cache.value)
unload_kernel_module(CasModule.disk.value)
Copy link
Contributor

Choose a reason for hiding this comment

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

as above

Comment on lines +328 to +329
unload_kernel_module(CasModule.cache.value)
start_cache(cache_dev.partitions[0], force=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

as above

Comment on lines +357 to +360
modes_list = []
for mode in CacheMode:
modes_list.append(mode)
return modes_list
Copy link
Contributor

Choose a reason for hiding this comment

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

return [mode for mode in CacheModes]

@Ostrokrzew Ostrokrzew added the RFC Request For Comments label Aug 24, 2020
vzhereb9 pushed a commit to vzhereb9/open-cas-linux that referenced this pull request Jun 14, 2021
@CAS-Linux-Jenkins
Copy link

Can one of the admins verify this patch?

@katlapinka
Copy link
Contributor

Upgrade in flight is not supported anymore

@katlapinka katlapinka closed this May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

RFC Request For Comments tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants