Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Casskop incorrectly determine version of image in case if image repository contains custom port #374

Closed
ibumarskov opened this issue Oct 27, 2021 · 1 comment · Fixed by #375

Comments

@ibumarskov
Copy link
Contributor

Bug Report

If we don't explicitly specify the serverVersion in CR, operator should parse this value from image name. Some deployments can contains proxy for image repository and in this case image name can looks like:
cassandraImage: '127.0.0.1:44301/tungsten/cassandra:3.11.6'

In this case operator can't detect version due to incorrect logic and leave PRODUCT_VERSION env variable empty:


it's lead to error in config-builder init container.

Environment

  • casskop version:
    latest

Possible Solution
Change appropriate code in following way:
if serverVersion == "" { if len(image) >= 2 { version := strings.Split(image[len(image)-1], "-") serverVersion = version[0] if len(version) != 1 { serverVersion += ".0" } } }

@fdehay
Copy link
Member

fdehay commented Oct 27, 2021

hello @ibumarskov,
Thanks for reporting your issue and providing a fix for it :)
As I said in an earlier issue, Casskop is in a complex state with little support from Orange at this stage.
Let's talk in the PR thread :)

fdehay added a commit that referenced this issue Nov 10, 2021
Fix issue #374 with determining the cassandra version from image
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants