text:
validate incoming data

we need to reject faulty data
clients need feedback when their data is wrong

this needs to be fixed before merging.  It is going to have a significant performance hit due to the passed metrics payloads being iterated over twice when the sender isAdmin(), ie the majority of our metrics.

source: gharchive/pull-request

authors: Dieterbe woodsaj

repo: raintank/tsdb-gw

license_type: permissive

license_source: bigquery


text:
Failed to lookup symbol 'FloodFill'

@rainyl , When I attempt to execute the cv.floodFill function, I encounter the following exception.
Please see the details of the exception below:
`E/flutter ( 9850): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Failed to lookup symbol 'FloodFill': undefined symbol: FloodFill
E/flutter ( 9850): #0      DynamicLibrary.lookup (dart:ffi-patch/ffi_dynamic_library_patch.dart:33:70)
E/flutter ( 9850): #1      CvNativeImgproc._FloodFillPtr (package:opencv_dart/src/g/imgproc.g.dart:2362:38)
E/flutter ( 9850): #2      CvNativeImgproc._FloodFillPtr (package:opencv_dart/src/g/imgproc.g.dart)
E/flutter ( 9850): #3      CvNativeImgproc._FloodFill (package:opencv_dart/src/g/imgproc.g.dart:2363:27)
E/flutter ( 9850): #4      CvNativeImgproc._FloodFill (package:opencv_dart/src/g/imgproc.g.dart)
E/flutter ( 9850): #5      CvNativeImgproc.FloodFill (package:opencv_dart/src/g/imgproc.g.dart:2338:12)
E/flutter ( 9850): #6      floodFill. (package:opencv_dart/src/imgproc/imgproc.dart:334:20)
E/flutter ( 9850): #7      cvRun (package:opencv_dart/src/core/base.dart:83:76)
E/flutter ( 9850): #8      floodFill (package:opencv_dart/src/imgproc/imgproc.dart:333:3)
E/flutter ( 9850): #9      _MyAppState.rpPaintHSV (package:opencv_dart_example/main.dart:151:8)
E/flutter ( 9850): #10     _MyAppState.build.. (package:opencv_dart_example/main.dart:72:21)
E/flutter ( 9850): #11     State.setState (package:flutter/src/widgets/framework.dart:1203:30)
E/flutter ( 9850): #12     _MyAppState.build. (package:opencv_dart_example/main.dart:69:19)
E/flutter ( 9850): #13     TapGestureRecognizer.handleTapDown. (package:flutter/src/gestures/tap.dart:624:61)
E/flutter ( 9850): #14     GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:344:24)
E/flutter ( 9850): #15     TapGestureRecognizer.handleTapDown (package:flutter/src/gestures/tap.dart:624:11)
E/flutter ( 9850): #16     BaseTapGestureRecognizer._checkDown (package:flutter/src/gestures/tap.dart:300:5)
E/flutter ( 9850): #17     BaseTapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:277:7)
E/flutter ( 9850): #18     GestureArenaManager._resolveByDefault (package:flutter/src/gestures/arena.dart:269:25)
E/flutter ( 9850): #19     GestureArenaManager._tryToResolveArena. (package:flutter/src/gestures/arena.dart:249:31)
E/flutter ( 9850): #20     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
E/flutter ( 9850): #21     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)`

v1.2.4 has been published, now please upgrade to v1.2.4 to use it, remember to run flutter clean

Also, if you have any new problems, feel free to reopen this issue.

source: gharchive/issue

authors: Marlenfranto rainyl

license_source: github-api


text:
🛑 RiotSkin4CN-Download is down

In 9827a06, RiotSkin4CN-Download (https://s-cd-4307-general.oss.dogecdn.com/riotskin4cn/live.json) was down:

HTTP code: 0
Response time: 0 ms

Resolved: RiotSkin4CN-Download is back up in 8f462c6.

license: MIT


text:
🛑 RiotSkin4CN-Download is down

In 113a157, RiotSkin4CN-Download (https://s-cd-4307-general.oss.dogecdn.com/riotskin4cn/live.json) was down:

HTTP code: 0
Response time: 0 ms

Resolved: RiotSkin4CN-Download is back up in 62fd886.


text:
Multiline string not display correctly

Hi,
When you have a variable with multiple lines could either not show the content of the variable at all or just display the first or last line.
Use the code below to reproduce the issue.
#!/usr/bin/perl

print "Testing\n";
my $foo = <<END_MESSAGE;
                    MULTIPLE LINES ISSUE 1
                    MULTIPLE LINES ISSUE 2
                    MULTIPLE LINES ISSUE 3
                    MULTIPLE LINES ISSUE 4
                    MULTIPLE LINES ISSUE 5
                    MULTIPLE LINES ISSUE 6
                    MULTIPLE LINES ISSUE 7
                    MULTIPLE LINES ISSUE 8
                    MULTIPLE LINES ISSUE 9
                    MULTIPLE LINES ISSUE 10
END_MESSAGE

my $foo2 = qq /
                    MULTIPLE LINES ISSUE 1
                    MULTIPLE LINES ISSUE 2
                    MULTIPLE LINES ISSUE 3
                    MULTIPLE LINES ISSUE 4
                    MULTIPLE LINES ISSUE 5
                    MULTIPLE LINES ISSUE 6
                    MULTIPLE LINES ISSUE 7
                    MULTIPLE LINES ISSUE 8
                    MULTIPLE LINES ISSUE 9
                    MULTIPLE LINES ISSUE 10
            /;

my $foo3 = $foo1.$foo2;

print "Done\n";

Possibly fixed by #91

authors: cristianpsg hoehrmann

repo: raix/vscode-perl-debug

license: mit


text:
Will this fail the tests when images don't match

ping @rajdeepv

We are trying to execute nakal_execute from other places and not step definition, then how we are supposed to do that?

@prasadkalgutkar It should work as usual.

authors: prasadkalgutkar rajdeepv saikrishna321

repo: rajdeepv/nakal


text:
Support for passing strings that contain nul accross the FFI boundary

In C all strings are terminated by a null byte (0x0), which means that strings using the idiomatic C representation cannot contain null.
However, many languages, including Python and C# support strings that store length as a separate value and can contain null. It would be nice if Interoptopus provided a canonical way to pass such strings accross the FFI boundary.
The only way to do this currently that I can figure out is to use a slice of bytes and convert manually whenever you cross the FFI boundary, which is incovenient and in for example Python requires copying the entire string for every conversion.

what specifically would be a new Rust type, and what would be the foreign counterparts?

I was hoping that the foreign counterpart could be the the target language's built-in string type (e.g. str in Python or string in C#), but that might have technical complications. As for the Rust type I don't really know and as long as I can conver a normal std::string::String into it I don't think it makes much of a difference.

repo: ralfbiedert/interoptopus


text:
Time to think about what needs to be done for 1.0

Brainstorming time.
What would we really like accomplished before we publish version 1.0?
Remember that at 1.0, we start playing right with full Semver compatibility, which means, among other things, that we don't break backward compatibility except on major versions.  This probably means slower iteration time, and a slightly more contemplative approach to API changes.
Thanks to all the hard work of so many contributors, we've gotten quite a useful library built, and thanks to some hard work especially by @davidchambers, both the API and the implementation are relatively consistent.  But there's probably still work to do in both API and implementation.
Moreover there are several other places that need work.  There is infrastructure work to be done.  @buzzdecafe has just started switching over to using NPM instead of grunt for many build tasks.  I'd really like to get to the point where everything we need can be built through NPM.  And there are some other issues regarding the running of Sauce, reporting of our Benchmark tests, the possibility of more sophisticated custom builds.
Our documentation has improved remarkably fairly recently.  But I think there is still work to do.  It really should have a more responsive design so that it works well on mobile.  It would be nice to include source code links.  Although we're publishing multiple versions, there's no indication that the docs for older versions are online; we should have a link to them.  Dreaming a little further, it would be nice if a hover of an example offered you the ability to launch it in the REPL.
Speaking of the REPL, it's a very nice piece of work, but it could also use some love.  It would be great to skin it to look like any other of our pages, for one.  But there could be other improvements, like capturing console.log statements and displaying their output.  Perhaps we could hover help to Ramda functions used, with the content of the documentation serving as a guide.
So, while the most important issues will always be the core code itself, it's obvious that there are many other things that need to be done.
I'm not sure of the best way to start addressing these points.  Should we just leave open an issue like this?  Should be keep track of this on our little-used wiki?  Something else?
I'm not going to struggle too hard to make this happen, but if it's possible, I would love to see 1.0 come out in May or June.  Does that sound reasonable?
Are there people out there willing to help with some of these tasks?  I don't think Michael, David, and I could possibly do all this in two months.

I'm more than happy to help out, if/where needed.
As for tracking the outstanding tasks, you could just use an issue such as this with a task list linking to all issues considered as blockers for 1.0, otherwise just label all the blocking issues individually.

my $0.02:
Must:

[ ] compile a list of functions that should be transducer-comaptible
[ ] make the list transducer-compatibile
[ ] decide where exactly we stand on variadic functions in the lib
[ ] decide on returning a curried function from curry and compose
[ ] consider curried, binary compose along with another compose function that takes a list

Would be nice:

[ ] docs category dropdown
[ ] links to prior version docs
[ ] REPL in same template
[ ] more REPL examples

Maybe someday

[ ] Ramda cookbook
[ ] Debug build

what else ....

Must

[ ] curate the remainder of our issues/pr lists
[ ] figure out our stand on the depth of internal dependencies we're willing to accept

Would be nice

[ ] build everything through NPM
[ ] responsive design for docs
[ ] links to source code in docs

Maybe someday

[ ] docs examples link to REPL
[ ] better REPL output

Two more nice to haves:
Some official mechanism for extending Ramda.
Official meteor support currently package by @kevohagan is used https://github.com/kevohagan/meteor-ramda/

It's cool that this is the 1000th issue!

It's cool that this is the 1000th issue!

I'd been thinking about it for a while, and was going to discuss it first in Gitter, but when I saw that we were at issue 999, I had to write it up and hope no one beat me to that nice round number!  So it was intentional.  (And yes, I'm a geek!)

Some official mechanism for extending Ramda.

It might be worthwhile looking at introducing something like a ramda-contrib org in Github where suggestions or things that would make useful extensions, but aren't quite core to Ramda, still have a central place to live. If it's only likely to house a few extra repos though, it may not be worthwhile.

@bobiblazeski:

Some official mechanism for extending Ramda.

What do you have in mind? I don't understand it. Wouldn't just defining a new function dependent on Ramda be an "extension"? The way I see it that's one of the neat things with functional programming: you don't have to attach functions to prototypes, inherit from classes, define mixins, etc. as would to extend a OO library.

@paldepind  where would you put functions that are used all over your projects but aren't general enough to go into core ramda? And what if you want to use ramda internals for efficiency or something?

where would you put functions that are used all over your projects but aren't general enough to go into core ramda?

In a module for utility functions – the same place where I keep all the other functiosn that are used all over my project but aren't part of any third party library.

And what if you want to use ramda internals for efficiency or something?

Then I would argue that Ramda has failed in delivering what it should. It should give you all the essential building blocks with adequate performance.
I think exposing internal functions in any way is a path to disaster. I library can and should only make promises with regards to its external API.

@paldepind Note the plural, projects in my question. I have certain functions that I repeatedly use in many projects that extend Ramda functionality. I could either create separate project but it would be nicer to be able to somehow extend Ramda.They're like jquery plugins.
Ramda is general purpose utility expecting to deliver performance or certain behavior in some niche use cases is not something that could be expected.
I wasn't proposing to expose the internals, but being be able to hook into the build process would  be nice feature to experiment and add custom functionality.
Note that all those things are nice to haves, maybe even better to be considered after 1.0 when API is more stable.

Note the plural, projects in my question.

I missed that, sorry.

I have certain functions that I repeatedly use in many projects that extend Ramda functionality. I could either create separate project but it would be nicer to be able to somehow extend Ramda.They're like jquery plugins.

How would you avoid having a separate project? They'd have to be part of something other than Ramda. ramda-contrib, my-awesome-ramda-functions, etc.
As far as I know jQuery plugins do not have access to any internal jQuery functions. They are just functions added to the jQuery objects prototype.

Ramda is general purpose utility expecting to deliver performance or certain behavior in some niche use cases is not something that could be expected.

No, indeed not. But it should provide general functions that could be combined for your specific use case. If extension (whatever that means) writers find they need some internal function then other Ramda users will need it as well.

I wasn't proposing to expose the internals

It sounds like that to me when you ask "And what if you want to use ramda internals".
This still doesn't make much sense to me. Could you maybe give an example of what you would like to be able to do?

I want to be able to experiment easier with adding custom functions, that might use internals in the build process and are bundled with Ramda code.

authors: CrossEye bobiblazeski buzzdecafe davidchambers paldepind scott-christopher

repo: ramda/ramda


text:
reduce use 2 params has diff return

ramda@0.27.1
var fn1 =R.reduce((r,x)=>{
r.push(x)
return r
},[])
fn1([1,2,3])  // [1,2,3]
fn1([4,5,6])  // [1,2,3,4,5,6]
var fn2 = z => R.reduce((r,x)=>{
r.push(x)
return r
},[], z)
fn2([1,2,3])  // [1,2,3]
fn2([4,5,6])  // [4,5,6]
why?
because
/** The iterator function receives two values: (acc, value). It may use R.reduced to shortcut the iteration. */
?

Because in fn1, R.reduce hold only one reducer: (r,x)=>{ r.push(x); return r; }, if you modify acc in place, all the subsequent call of fn1 will be affected by the same acc
You should keep the acc immutable, and return a new acc , as follows:
var fn1 =R.reduce((r,x)=>{
  const newAcc = [...r, x]
  return newAcc
},[])

fn1([1,2,3]) // [1,2,3]
fn1([4,5,6]) // [4,5,6]

:) THX, but ... Unintuitive as for me.
suggest More explanation on doc.

Yes, I think it is necessary to remind user of this situation in doc.
Or can we do something to optimize R.reduce to avoid this situation ?
@CrossEye

a Low-level error. I use a "side effect" method in iterator function.
Because js array point is Immutable.

@HoKangInfo:  I have no problem adding a sentence to the documentation to warn about this.  The question has arisen on occasion.  Do you have suggested wording for it?
@adispring: I don't think reduce should try to handle this itself.  The minute we do, we break any existing code that actually depends on this behavior.  Ramda is supposed to be a library that helps users work in a certain style but it does not attempt to enforce that style.

@CrossEye THX, but my English is not good.

How does this sound (addition in bold):

Returns a single item by iterating through the list, successively calling the iterator function and passing it an accumulator value and the current value from the array, and then passing the result to the next call.
The iterator function receives two values: (acc, value). It may use R.reduced to shortcut the iteration.
Note: R.reduce does not skip deleted or unassigned indices (sparse arrays), unlike the native Array.prototype.reduce method. For more details on this behavior, see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description
Be cautious of mutating and returning the accumulator.  If you reuse it across invocations, it will continue to accumulate onto the same value.  The general recommendation is to always return a new value.  If you can't do so for performance reasons, then be sure to reinitialize the accumulator on each invocation.
Dispatches to the reduce method of the third argument, if present. When doing so, it is up to the user to handle the R.reduced shortcuting, as this is not implemented by reduce.
See also reduced, addIndex, reduceRight.

Because my English is not good.
Adding examples can be more intuitive.

I really don't like adding examples of what not to do to our documentation.  I'm afraid that would lead to trouble.
But maybe we can write an example of how to do it right that includes a comment explaining why the alternative is not recommended?  The trouble is that our current example just uses numbers where this won't be a problem and it does double-duty in showing the difference between reduce and reduceRight.
Suggestions?

authors: CrossEye HoKangInfo adispring


text:
adjustWhere

Seems like evolveWhere could be relevant too -- perhaps even the same function. If I used R.map rather than list.map then it should work. I just don't know what we'd call it.

Mostly, this LGTM.
I think it would be more idiomatic if we were to call the map function rather than a map method.  It probably wouldn't change much.  It should also note that this is available for other functors besides lists.  So perhaps:
module.exports = _curry3(function adjust(adj, pred, functor) {
  return map(function(item) {
    return pred(item) ? adj(item) : item;
  }, functor);
});

With some tests to show these behaviors:
R.adjustWhere(R.add(1), R.equals(2), [0, 1, 2, 2]); //=> [0, 1, 3, 3]
R.adjustWhere(R.add(1), R.equals(2), Just(2)); //=> Just(3)
R.adjustWhere(R.add(1), R.equals(2), Just(5)); //=> Just(5)
R.adjustWhere(R.add(1), R.equals(2), Nothing()); //=> Nothing()

My only other concern is that I'm not convinced that the first two parameters are in the right order.  I'm not sure they aren't but I hate to get these things wrong.

i'm not sold on the arg order or the name (sorry for the bikeshedding).

On the name: where and whereEq take a spec object; it'd be nice to keep that name-API linkage consistent.
On the argument order: IMO this function is a map that only applies the mapping to the elements that satisfy the predicate. So I propose something like:

mapWhen :: (a -> Bool) -> (a -> b) -> [a] -> [b]

The function needs to be a -> a rather than a -> b, @buzzdecafe. The generalized signature you're proposing (which I like) is:
mapWhen :: Functor f => (a -> Boolean) -> (a -> a) -> f a -> f b

I then wonder why one would use
R.mapWhen(pred, f, functor)

rather than
R.map(R.when(pred, f), functor)

I don't consider this worthwhile sugar.

The function needs to be a -> a rather than a -> b, @buzzdecafe.

I guess it depends on what you mean by "needs"; e.g.:
mapWhen(gt(__, 1), toString, [1, 2, 3]) //=> [1, '2', '3']

Now you could say that the mixed-type list that comes out is pretty gross. And I would agree. But it is a possible a -> b outcome in this dirty js world we find ourselves in. :-)
But I think this quibble is moot anyways, since R.map(R.when(pred, f), functor) captures the same thing. So I'm afraid I am a "no" on this PR.
once again I am agreeing with @davidchambers ! either @davidchambers is getting dumber or i am getting smarter.

once again I am agreeing with @davidchambers ! either @davidchambers is getting dumber or i am getting smarter.

And I'm agreeing with both.  Is the apocalypse upon us?
Although this is potentially useful, as demonstrated it's easily achievable, and a dedicated function could be written like this:
const mapWhen = curry((pred, adj, functor) => map(when(pred, adj), functor));

ah yes. fair enough. i didn't know about R.when

yeah i missed it myself. thanks for the pr, i appreciate you taking the time.

authors: CrossEye buzzdecafe ccorcos davidchambers


text:
Latest version 1.3 crashes with refine_corner flag

System information (version)

Operating System / Platform => Ubuntu 22
OpenCV =>  4.5.5
Ceres => 2.0
Boost =>  1.74
C++ => 17
Compiler =>  g++11.4

Vision system

Number of cameras => 6
Types of cameras =>  fisheye, 5mm
Multicamera configurations => non-overlapping
Configuration file => *.yml

0000001 | 2024-10-06, 19:44:21.266054 [info] - Nb of cameras : 6   Nb of Boards : 9   Refined Corners : true   Distortion mode : 1
0000002 | 2024-10-06, 19:44:21.266414 [info] - Extraction camera 001
0000003 | 2024-10-06, 19:44:21.270420 [info] - Number of threads for board detection :: 8
0001500 | 2024-10-06, 19:44:22.039815 [info] - Number of detected corners :: 16
terminate called after throwing an instance of 'cv::Exception'
what():  OpenCV(4.5.5) /home/vsw/opencv/opencv/modules/imgproc/src/filterengine.hpp:367: error: (-215:Assertion failed) anchor.inside(Rect(0, 0, ksize.width, ksize.height)) in function 'normalizeAnchor'

Also after boards extraction i got this:
0011632 | 2024-10-07, 08:51:40.934021 [info] - Number of detected corners :: 16
0011633 | 2024-10-07, 08:51:41.724832 [info] - Number of detected corners :: 16
0011634 | 2024-10-07, 08:51:42.597949 [info] - Board extraction done!
0011635 | 2024-10-07, 08:51:42.597994 [info] - Intrinsic calibration initiated
0011636 | 2024-10-07, 08:51:42.598002 [info] - Initializing camera calibration using images
0011637 | 2024-10-07, 08:51:42.598008 [info] - NB of board available in this camera :: 419
0011638 | 2024-10-07, 08:51:42.598023 [info] - NB of frames where this camera saw a board :: 291
0011639 | 2024-10-07, 08:51:44.884207 [info] - cameraMatrix : [779.2226013779195, 0, 1223.5;
0, 779.2226013779195, 1023.5;
0, 0, 1]
0011640 | 2024-10-07, 08:51:44.884275 [info] - distCoeffs : [0;
0;
0;
0]
0011641 | 2024-10-07, 08:51:44.884312 [info] - NB of board available in this camera :: 899
0011642 | 2024-10-07, 08:51:44.884318 [info] - NB of frames where this camera saw a board :: 499
terminate called after throwing an instance of 'cv::Exception'
what():  OpenCV(4.5.5) /home/vsw/opencv/opencv/modules/calib3d/src/fisheye.cpp:1400: error: (-215:Assertion failed) fabs(norm_u1) > 0 in function 'InitExtrinsics'
Aborted (core dumped)

Here i changed to Brown lens model
0001916 | 2024-10-07, 09:51:24.069684 [info] - Number of detected corners :: 16
0001917 | 2024-10-07, 09:51:25.190587 [info] - Number of detected corners :: 16
0001918 | 2024-10-07, 09:51:25.444131 [info] - Number of detected corners :: 16
0001919 | 2024-10-07, 09:51:26.623468 [info] - Board extraction done!
0001920 | 2024-10-07, 09:51:26.623509 [info] - Intrinsic calibration initiated
0001921 | 2024-10-07, 09:51:26.623517 [info] - Initializing camera calibration using images
0001922 | 2024-10-07, 09:51:26.623523 [info] - NB of board available in this camera :: 419
0001923 | 2024-10-07, 09:51:26.623529 [info] - NB of frames where this camera saw a board :: 291
terminate called after throwing an instance of 'cv::Exception'
what():  OpenCV(4.5.5) /home/vsw/opencv/opencv/modules/calib3d/src/calibration.cpp:1401: error: (-211:One of the arguments' values is out of range) image width and height must be positive in function 'cvCalibrateCamera2Internal'
Aborted (core dumped)

So this version unstable

Version 1.2 works fine with the same dataset.

%YAML:1.0
nb_camera: 1
camera_0:
camera_matrix: !!opencv-matrix
rows: 3
cols: 3
dt: d
data: [ 1.4799789608496751e+03, 0., 1.2240177577456254e+03, 0.,
1.4811642409123265e+03, 1.0287498619058504e+03, 0., 0., 1. ]
distortion_vector: !!opencv-matrix
rows: 1
cols: 4
dt: d
data: [ -1.1811758718657783e-01, -1.3651191105142327e-02,
8.3695880187125947e-03, -4.0873141364124515e-03 ]
distortion_type: 1
camera_group: 0
img_width: 2448
img_height: 2048
camera_pose_matrix: !!opencv-matrix
rows: 4
cols: 4
dt: d
data: [ 1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 0.,
1. ]

Have rebuild opencv from 4.5.5 to 4.6.0 and the problem gone away.

@vswdigitall Apparently, there are many breaking changes (no backward compatibility) in OpenCV 4.6.0 and 4.7.0 in relationship to charuco boards. Please make sure to use the same OpenCV version for board generation and calibration.
Since we have not tested McCalib with newer versions yet, I'd recommend using OpenCV 4.5.5 until we verify later versions.

The main problem is about model selection: fisheye or not.
Now i can calibrate with Brown model only.
Here is my images. 5mm lens for imx264
What lens model is it?

I would most likely use the fisheye model for this camera. When you use the fisheye model, are you facing this issue?
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(4.5.5) /home/vsw/opencv/opencv/modules/calib3d/src/fisheye.cpp:1400: error: (-215:Assertion failed) fabs(norm_u1) > 0 in function 'InitExtrinsics'

We have addressed a similar problem in a previous commit to avoid points outside of the image. Maybe you can adjust the tolerance threshold? I hope it will help Link

Yes, thanks. I forgot this magic parameter. With 0.2 my dataset calibrated as fisheye on opencv 4.5.4.

authors: BAILOOL rameau-fr vswdigitall

repo: rameau-fr/MC-Calib


text:
fix: disable validation when enabled is false

Hi Ram.
Thanks for this plugin. I am proposing this change because I do not know if there is another way. Please tell me what do you think.
We are using enabled: false to completely skip wso2 deploy when it is a local environment (LocalStack).
If validation is not skipped in this case, we get invalid configuration errors.

Codecov Report

Merging #57 (096057e) into main (0033114) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #57   +/-   ##
=======================================
  Coverage   74.66%   74.66%
=======================================
  Files           3        3
  Lines         371      371
  Branches       29       29
=======================================
  Hits          277      277
  Misses         80       80
  Partials       14       14

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0033114...096057e. Read the comment docs.

Hi @gabrielmoreira
Thanks for your feedback. It is indeed a good find. Let's keep a tab on E2E test results (pipelines are running) and take it from there.
Ciao!

E2E tests @ https://github.com/ramgrandhi/serverless-wso2-apim/pull/57/checks?check_run_id=2498629494
Just one minor change to the prompt you're using :: Configuration is disabled globally, Skipping validation.. OK

Rest looks good to me. Thanks!


text:
Composer Dependency Hell

OK I had a look at the repro case from https://github.com/ramsey/composer-plugin-issue
The root cause of the problem really is https://github.com/ramsey/composer-repl/blob/91e0403b4695d299e7c37c53e6776efa940fe651/src/Composer/ReplCommand.php#L86 which prepends the application's autoloader to Composer's, which mean that some of the files get loaded from the Composer phar and then whatever is loaded after this line runs is loaded from the local vendor dir.
A workaround is to make sure everything which may clash gets loaded beforehand, e.g this appears to resolve it:
        class_exists('Symfony\Component\Console\Input\ArrayInput');

        /** @psalm-suppress UnresolvableInclude */
        require $vendorDir . '/autoload.php';

The only proper and definitive fix however would be to stop sharing the process space between the project deps and Composer.. And for that having a binary like vendor/bin/composer-repl or whatever you wanna call it which does locate the vendor dir, include autoloader, do whatever is needed, then start psysh, would be more appropriate.
You could even run vendor/bin/composer-repl as a new process (make sure to run with TTY enabled) from within the ReplCommand so that you retain BC and retain a way to call this via composer repl. But people could also add "scripts": {"repl": "@php vendor/bin/composer-repl"} and be able to call composer repl then which would run the composer-repl binary.. and that would not require a composer plugin or command integration here.
If any of the above is unclear please ask I'm happy to explain in more details.

Won't this "resolve" the bug by loading the non-vendored non-plugin specific Symfony console?

Yes as I said that's a workaround, it fixes the current symptom but not the underlying problem.

Just wanted to understand. Can confirm this is working for me from PHP 8 & 8.1 Nice 👍

Replying to https://github.com/ramsey/composer-plugin-issue/issues/1 here just to keep everything in the same place, as it really expands on my answer above.
In Composer we cannot run plugins in a sub-process IMO, as they would still need access to the runtime Composer stuff, which would mean loading the Composer classes (and dependencies) again. So there's no point.
It's indeed a problem of the sequence of autoloaders, and that is why in Composer we run the Composer autoloader first by default, and run plugin/script dependencies autoloaders (which are created at runtime, and not loaded from vendor/autoload.php) after the Composer one, as they get appended.
The default for the vendor/autoload.php autoloader though is to prepend itself when registering, which was done to fix issues in contexts like PHPUnit where PHPUnit loads the bootstrap file and then the application loader should take precedence over PHPUnit, otherwise you may get broken tests. But it's also true that if PHPUnit uses the same dependencies as your app in a version which is incompatible you may break PHPUnit this way.. it does have the same dilemma as Composer in terms of minimizing third-party dependencies, and you can see that it also hardly uses any.
So another workaround would be to load the application autoloader in append mode vs prepend.. which could be done as is I believe:
        /** @psalm-suppress UnresolvableInclude */
        $loader = require $vendorDir . '/autoload.php';
        $loader->unregister();
        $loader->register(false);

That would also fix the symptom but it doesn't really isolate things so it may still result in issues down the line. Process isolation in the context of composer-repl is IMO possible and would be beneficial and fix things in a more definitive way.

I'm proceeding with a solution that runs the existing bin/repl in a separate process. It works well; I'm working out some issues with tests before pushing up the code.

Thanks for the thorough investigation and recommendations, @Seldaek!
I've modified the composer repl command so that it now executes bin/repl in a separate process: https://github.com/ramsey/composer-repl-lib/blob/0732a3cf0e63f56cf29f97ef36fd61f37c333b86/src/Composer/ReplCommand.php#L76-L84
I've also moved all the "library" code out of this repository into ramsey/composer-repl-lib. This will allow others to install the package as a non-plugin, and it will also allow for easier extension and building on top of it.
This repository is now just the plugin configuration, and it requires ramsey/composer-repl-lib.

Thank you both for your valuable insight. Sorry that I cannot think of a more appropriate venue, and apologies for posting on a now closed issue; I wanted to add some context to the follow-up I got.
Sub-processing

In Composer we cannot run plugins in a sub-process IMO, as they would still need access to the runtime Composer stuff, which would mean loading the Composer classes (and dependencies) again. So there's no point.

a. I Hear you. I think perhaps we were talking about two separate things. I was saying for Ben specific repl plugin; I think sub-processing is a tool, that could get fast-feedback, and allow a repl to be run as a composer plugin; that uses composer dependencies; but loads a sub-process which runs a repl session. Not that composer itself needs to or should have been designed in any other way.
Again, for Ben project; this could then be sent details from the parent process; and use the source code for the project it is installed under separately. It was a castaway thought for ways to avoid the context switch cost of registering and unregistering autoloaders; as well as attempting some class isolation; which might be a more "correct/strict" (struggling for words here), but painful way to keep two things separate under a single process. This (to my mind) is very similar to iterative vs recursive solving an algorithm.
b. More generally to composer; I'm not 100% certain that there is no way to make subprocessing work; and can even think of sandboxing benefits; but I'll accept that it's a direction that has more decisions that would have to be made about reading and issuing commands to change the internal state of the parent composer process. To do that for a single use case, I agree would not be good.
Further on that. I wonder if you'd considered a potential work-around for this without requiring composer autoloader in the subprocess? Using shared memory or a dedicated IO handle for communication are some methods. I'll not suggest a socket based server 😄. I'll hand wave this off as "standard IPC applies"; but I also agree that reaching for IPC if it can be avoided is a smell, and that it could be a lot of work. So not a proposal, more of a "I wonder if they considered?".
I'm ecstatic Ben has chosen to explore the sub-process route for their specific plugin.
Unregistering / boundary enforcement
The largest issue I see here I alluded to, perhaps too vaguely. I Apologize for that vagueness:

One issue is that it is a race to define the classes used; even with unregistering; there would be yet more work to clean off things more within the same PHP instance.

I think we were agreeing when you wrote:

So another workaround would be to load the application autoloader in append mode vs prepend.. which could be done as is I believe:
    /** @psalm-suppress UnresolvableInclude */
    $loader = require $vendorDir . '/autoload.php';
    $loader->unregister();
    $loader->register(false);

That would also fix the symptom but it doesn't really isolate things so it may still result in issues down the line. Process isolation in the context of composer-repl is IMO possible and would be beneficial and fix things in a more definitive way.

The part this example didn't address which I was hinting at and I think you were saying makes this "unsolvable" was that once a class is used; it won't matter if a different autoloader is present because it will have a class definition from a prior library version dependency tree.
Worse still, it may not have the entire tree of dependent classes; or load an incompatible as-yet unloaded instance of a class with the correct namespace and class name, but an incompatible version from another sub-tree. The two autoloaders becomes like having two box-office directors for a film; each unable to compromise. This was not lost on me.
Thanks for chat; glad Ben has a direction now, and that it's not involved sweeping changes to core infrastructure or tooling. If solving or exploring the composer is of interest; I'd be at least curious to look 👀 or participate 💬 📜 💻 .

authors: Lewiscowles1986 Seldaek ramsey

repo: ramsey/composer-repl


text:
Falure when using single ISIN as a ticker (fix included)

Multiple tickers with ISINs mixed in do work, but a single ISIN fails. Here is the culprit (multi.py):

if len(tickers) == 1:
   ticker = tickers[0]
   return shared._DFS[shared._ISINS.get(ticker, ticker)]

The last line should be just

return shared._DFS[ticker]

as at that point in time both _DFS and tickers refer to Yahoo ID instead of ISIN, and lookup by original ISIN in _DFS is failing.
Testcase:

import yfinance as yf
yf.download("SE0000594111", period="7d", repair=True, progress=False, threads=False, timeout=30)

(corresponding Yahoo ID is '0P00000FYR.ST'.

Anyone can contribute code, just read #1084

repo: ranaroussi/yfinance


text:
Cannot distinguish between placeholder/hint and default values in input fields in light mode

On Rancher v2.6-head version 9d5c699. In light mode dashboard UI.
Eg. when defining a new AKSv2 cluster in Explorer there are some input boxes which have no default value set but they look like they have it. Cluster Resource Group text is not greyed out enough. The text in Linux Admin Username field looks greyed out, but there is actually text in the field.

Can we grey out placeholder text? Including DNS Prefix field. And make default text a normal opacity? Linux Admin Username field for example.

Related issue:
https://github.com/rancher/dashboard/issues/3837

I successfully reproduced
Note: I don't see this issue in dark mode, only in the light mode.
Reproduction Environment:

Rancher version: v2.6-9d5c699e18d174cb980e342a796ed828eeefcd18-head
Rancher cluster type: single-node docker install
Docker version: 20.10
Downstream cluster type: AKS
Downstream K8s version: n/a
Reproduction steps:

Launch v2.6-9d5c699e18d174cb980e342a796ed828eeefcd18-head
Create an AKS cluster
I reproduced - I see the Linux Admin Username has text in a dark gray color. It's slightly darker than the Cluster Resource Group field but could indeed be mistaken for not having text filled in.

I tried with dark mode - dark mode works as expected the Linux Admin Username is a bright white compared to grey for the Cluster Resource Group

Additional Info:

My checks PASSED
Validation Environment:

Rancher version: v2.6-head e322f8f pulled at 11/22/21 10:11am Arizona time
Rancher cluster type: single-node docker install
Docker version: 20.10
Downstream cluster type: AKS
Downstream K8s version: n/a
Validation steps:

Create an AKS cluster. Notice the fields are now darker and more apparent what is pre-fill text and what is hint text:

Here in this screenshot we can see that the Linux Admin Username with azureuser is black, making it very clear this is text that is pre-filled into this field for us (default text content). Notice the Cluster Resource Group field remains gray to indicate it's helper text.

Here in this screenshot we can see that the Network Policy dropdown/field is now black since it's filled in with None. Also, the DNS Prefix is gray to indicate it's hint text.

authors: aaronyeeski davidnuzik

repo: rancher/dashboard


text:
Blank page shown when attempt to install a Helm Chart

Setup

Rancher version: v2.7.0

Describe the bug

Some RKE2 clusters do not contain an rkeConfig machineSelectorConfig, i'm not sure what scenario creates this
User goes to Cluster Explorer for the cluster --> Apps --> Charts -->  --> Install
A blank page is shown

To Reproduce

Create an RKE2 cluster that does not contain the rkeConfig machineSelectorConfig

With 2.7.2 RKE2 cluster it's there

Cluster Explorer for the cluster --> Apps --> Charts -->  --> Install

Result

Expected Result
Install wizard is shown
Additional context
The outcome is similar to https://github.com/rancher/dashboard/pull/7952 where a fix was applied to avoid an error in that function. For this issue it's a different location in that function that throws the error.
Both this and the other issue were new in 2.7.0

retest passed
tested on 2.7.2 rc4
testing-
tested on the following RKEs:
v1.23.16+rke2r1
v1.24.10+rke2r1
v1.25.6+rke2r1
stood up a RKE2 downstream clusters
validated the ability to install longhorn and UI operator to the downstream clusters.

authors: AndrewHoffmanQA richard-cox


text:
Login page link to switch to AP provider is hidden behind log in button

Setup

Rancher version:
Rancher UI Extensions: post 2.7.5
Browser type & version:

Describe the bug

Link to switch log in page to the AP log components is hidden behind the button to log in as local user

To Reproduce

Setup auth provider (github is easiests
log out
switch to local user view

Result

see screenshots

Expected Result

switch screenshots around

Screenshots
Before

After

Additional context

See https://github.com/rancher/dashboard/pull/9261#issuecomment-1620365251

Automation failed, moving to test

Pass verified fixed in rancher v2.7-head commit ID 027246f

navigated to hamburger > users & authentication
clicked on auth provider
enabled github oAuth
logged out
naviagated to rancher URL in incognito window
confirmed login options as expected

authors: richard-cox ronhorton


text:
Updating the source of internal/external ips for nodes

rancher/dashboard#680

RKE-specific annotations can't be the only source of this data; those will be totally missing for AKS/EKS/GKE/imported clusters.
Norman/2.x registers two mappers which determine the ipAddress and externalIpaddress that show up in the API (that the Ember UI then displays with some checks.
externalIpAddress looks at:

The last (not first, though usually there's 0 or 1...) status.addresses entry with type=ExternalIp
The value of the rke.cattle.io/external-ip annotation

I think mappers are applied in order so if both are present then the annotation wins, but awaiting confirmation.
[internal]ipAddress looks at just the last status.addresses entry with type=InternalIp.  The rke.cattle.io/internal-ip annotation is not involved (it's used only by RKE and Rancher code to hook up RKE).

Updated based on my understanding of what you said. If the order changes or we don't default to label for external ip let me know and I'll update.

Darren said status should take priority, so statusAddress || annotationAddress.
The 2.x UI also has some extra filtering to only show the 2 addresses if they're different, which you may want to replicate so it doesn't say the same IP twice in the common case (62.227.123.234 / 62.227.123.234)

I made the swap.

The 2.x UI also has some extra filtering to only show the 2 addresses if they're different, which you may want to replicate so it doesn't say the same IP twice in the common case (62.227.123.234 / 62.227.123.234)

@deniseschannon it does look a little odd when there's a duplicate ip. Would you like me to open an issue and talk to lauren about changing it?

@codyrancher Yes, can you open an issue and follow up with @lvuch

authors: codyrancher deniseschannon vincent99


text:
add id on div

https://github.com/rancherlabs/website/issues/1615

needs this pr merged first: https://github.com/rancherlabs/website-theme/pull/120

repo: rancher/docs


text:
Autoresize for autoformated disks doesn't work

RancherOS Version: v0.7.1
Where are you running RancherOS? baremetal
I'm starting RancherOS over ipxe.
kernel ${base-url}/vmlinuz rancher.state.dev=LABEL=RANCHER_STATE rancher.state.autoformat=[/dev/vda] ...

#cloud-config
rancher:
  resize_device: /dev/vda
  state:
    fstype: auto
    dev: LABEL=RANCHER_STATE
    autoformat:
      - /dev/vda

I also set resize_device, but it doesn't work. system-docker logs cloud-init-execute shows that it wants to resize /dev/vda1, which doesn't exist
time="2017-01-04T23:06:02Z" level=info msg="Running cloud-init-execute: pre-console=true, console=false"
WARN: unknown label
failed [sfd_dump:1] sfdisk --unit=S --dump /dev/vda
sfdisk: failed to dump partition table: Success
FAILED: failed to dump sfdisk info for /dev/vda
resize2fs 1.43.1 (08-Jun-2016)
open: No such file or directory while opening /dev/vda1
time="2017-01-04T23:06:03Z" level=error msg="Failed to resize /dev/vda: exit status 1"

I had to manually execute resize2fs /dev/vda to resize the disk.

Resize functionality is pretty primitive and is currently hard-coded to extend the first partition. The docs should be more clear about its limitations.
Putting resize2fs in runcmd should work pretty well as a workaround for now.

authors: joshwget kirrmann

repo: rancher/os


text:
Sidekicks don't work & break workload (but workload status still says Active)

Rancher versions: 2.0 master 1/21
Steps to Reproduce:

Create a workload
Try to add a sidekick

Results: Sidekick gets stuck in creating.  Workload status stays in Active.

Not sure about UI, sidekicks seem to be working now when created using API.

Tested with latest build from master -Mar 2
Able add sidekicks to existing workloads using api.

Create a workload with 1 container.
Update workload and add 1 more container to the existing list of containers.

Workload now shows 2 containers.

Both the containers in the pod have the same ip assigned to it.
pod spec shows 2 containers:
    con = [{"name": "test1",
           "image": "sangeetha/testclient"}]
    name = random_test_name("default")
    workload = p_client.create_workload(name=name,
                                        containers=con,
                                        namespaceId=ns.id)
    workloads = p_client.list_workload(name=name)
    assert len(workloads) == 1
    assert workloads[0].name == name
    time.sleep(10)
    side_con = {"name": "test2",
                "image": "sangeetha/testnewhostrouting"}
    con.append(side_con)
    workload = p_client.update(workload,
                               containers=con)

    "spec": {
        "containers": [
            {
                "image": "sangeetha/testclient",
                "imagePullPolicy": "Always",
                "lifecycle": {},
                "name": "test1",
                "resources": {},
                "securityContext": {
                    "capabilities": {}
                },
                "terminationMessagePath": "/dev/termination-log",
                "terminationMessagePolicy": "File",
                "volumeMounts": [
                    {
                        "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
                        "name": "default-token-8w9cn",
                        "readOnly": true
                    }
                ]
            },
            {
                "image": "sangeetha/testnewhostrouting",
                "imagePullPolicy": "Always",
                "lifecycle": {},
                "name": "test2",
                "resources": {},
                "securityContext": {
                    "capabilities": {}
                },
                "terminationMessagePath": "/dev/termination-log",
                "terminationMessagePolicy": "File",
                "volumeMounts": [
                    {
                        "mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
                        "name": "default-token-8w9cn",
                        "readOnly": true
                    }
                ]
            }
        ],

authors: kinarashah sangeethah tfiduccia

repo: rancher/rancher


text:
[bug] Operation cannot be fulfilled on machinedrivers.management.cattle.io "otc"

Rancher versions:
rancher/server: 2.0
Docker version: (docker version,docker info preferred)
Docker version 17.12.0-ce, build c97c6d6
Operating system and kernel: (cat /etc/os-release, uname -r preferred)
Ubuntu 16.04.3 LTS (Xenial Xerus) 4.4.0-113-generic
Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO)
VM
Environment Template: (Cattle/Kubernetes/Swarm/Mesos)
Kubernetes
Results:
sudo docker run -p 8080:80 rancher/server:preview

Output:
E0211 07:20:29.071273       1 generic_controller.go:191] MachineDriverController otc [machine-driver-controller] failed with : Operation cannot be fulfilled on machinedrivers.management.cattle.io "otc": the object has been modified; please apply your changes to the latest version and try again

Close this issue for rancher preview version. It has been fixed in rancher v2.0.4

authors: RainingNight loganhz


text:
TLS handshake error from IP: acme/autocert: host not configured

Rancher versions:
rancher/rancher:latest:v2.1.0
rancher/rancher-agent:v2.1.0
Infrastructure Stack versions:
kubernetes: v.11.3-rancher1-1
Docker version: (docker version,docker info preferred)
Containers: 39
 Running: 26
 Paused: 0
 Stopped: 13
Images: 22
Server Version: 18.06.1-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.15.0-36-generic
Operating System: Ubuntu 18.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 7.79GiB
Name: quantum
ID: 3MB5:5ZZ5:SESA:NO65:3XJW:DDDZ:TVTF:YIWZ:EZEE:VYN7:DSIX:QH7B
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Operating system and kernel: (cat /etc/os-release, uname -r preferred)
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Type/provider of hosts: (VirtualBox/Bare-metal/AWS/GCE/DO)
Bare metal

Setup details: (single node rancher vs. HA rancher, internal DB vs. external DB)
Single node rancher (following steps from documentation for letsencrypt)
Environment Template: (Cattle/Kubernetes/Swarm/Mesos)
Kubernetes

Steps to Reproduce:
docker run -d --restart=unless-stopped \
  -p 80:80 -p 443:443 \
  -v /docker/rancher:/var/lib/rancher \
  -e AUDIT_LEVEL=1 \
  rancher/rancher:latest \
  --acme-domain rancher.my-domain.com

docker logs -f rancher_server_container

Results:
Between 10 and 30 log lines per second like the ones below which at some point crash Rancher and that restarts the server container.
2018/10/11 13:03:53 [INFO] 2018/10/11 13:03:53 http: TLS handshake error from 109.202.0.188:53344: acme/autocert: host not configured
2018/10/11 13:03:54 [INFO] 2018/10/11 13:03:54 http: TLS handshake error from 89.197.152.162:56431: acme/autocert: host not configured
2018/10/11 13:03:54 [INFO] 2018/10/11 13:03:54 http: TLS handshake error from 89.197.152.162:42404: acme/autocert: host not configured
2018/10/11 13:03:55 [INFO] 2018/10/11 13:03:55 http: TLS handshake error from 89.197.152.162:47577: acme/autocert: host not configured
2018/10/11 13:03:56 [INFO] 2018/10/11 13:03:56 http: TLS handshake error from 89.197.152.162:58896: acme/autocert: host not configured
2018/10/11 13:03:56 [INFO] 2018/10/11 13:03:56 http: TLS handshake error from 89.197.152.162:63709: acme/autocert: host not configured
2018/10/11 13:03:56 [INFO] 2018/10/11 13:03:56 http: TLS handshake error from 89.197.152.162:59552: acme/autocert: host not configured
panic: Header called after Handler finished

goroutine 148508 [running]:
net/http.(*http2responseWriter).Header(0xc00e1da730, 0xc00374ee00)
	/usr/local/go/src/net/http/h2_bundle.go:6310 +0x99
github.com/rancher/rancher/pkg/filter.(*wrapWriter).Write.func1(0xc0115f0960, 0xc015478000, 0x35264, 0x3b757)
	/go/src/github.com/rancher/rancher/pkg/filter/filter.go:37 +0x38
created by github.com/rancher/rancher/pkg/filter.(*wrapWriter).Write
	/go/src/github.com/rancher/rancher/pkg/filter/filter.go:36 +0xb4

Can you drop the   -e AUDIT_LEVEL=1 \ and does it still happen then?

Thanks for your fast response! I've recreated the container removing the -e AUDIT_LEVEL. This did not fix the http: TLS handshake error from IP: acme/autocert: host not configured error, but so far it looks like it won't crash.

I have managed to understand why we were seeing the handshake error. The machine where rancher.my-domain.com is hosted uses an IP which is also used for some other services we used to had. Bots are trying to index subdomains which are pointing to the same IP address. So what happens is a bot tries to access https://some-sub-domain.my-domain.com which resolves to the public ip where rancher.my-domain.com is hosted and currently Rancher has not been setup to respond to that request as we're migrating from 1.6.
I confirmed my finding by doing a curl from outside to https://some-sub-domain.my-domain.com and the IP address from which I was testing appeared in the logs with the same TLS handshake error.
Thanks for your help and fast responses! I think we could close this although it would be good if there was a nicer message about this.

I have the same error.
Can not reach the rancher ui by via domain name, via its IP it is working fine.
Not clear how you solved it

The same error occures for me.
I can not provision any new clusters.
Tested with ec2 and hetzner  as the provider.
Maybe related? #16220
My docker-compose.yml:
version: '3'

services:
  rancher:
    image: rancher/rancher:v2.1.1
    container_name: rancher
    network_mode: host
    restart: unless-stopped
    volumes:
      - /mnt/rancher2:/var/lib/rancher
    command: --acme-domain rancher.example.com

Full rancher log
2018/11/19 10:23:29 [INFO] [mgmt-cluster-rbac-delete] Creating namespace c-tfmr6
2018/11/19 10:23:29 [INFO] [mgmt-cluster-rbac-delete] Creating Default project for cluster c-tfmr6
2018/11/19 10:23:29 [INFO] [mgmt-project-rbac-create] Creating namespace p-gtzwf
2018/11/19 10:23:29 [INFO] [mgmt-cluster-rbac-delete] Creating System project for cluster c-tfmr6
2018/11/19 10:23:29 [INFO] [mgmt-project-rbac-create] Creating creator projectRoleTemplateBinding for user user-2fbzl for project p-gtzwf
2018/11/19 10:23:29 [INFO] [mgmt-cluster-rbac-delete] Updating cluster c-tfmr6
2018/11/19 10:23:29 [INFO] [mgmt-project-rbac-create] Creating namespace p-hc2qs
2018/11/19 10:23:29 [INFO] [mgmt-project-rbac-create] Creating creator clusterRoleTemplateBinding for user user-2fbzl for cluster c-tfmr6
2018/11/19 10:23:29 [INFO] [mgmt-project-rbac-create] Creating creator projectRoleTemplateBinding for user user-2fbzl for project p-hc2qs
2018/11/19 10:23:29 [INFO] [mgmt-auth-crtb-controller] Setting InitialRolesPopulated condition on project p-gtzwf
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating clusterRole p-gtzwf-projectowner
2018/11/19 10:23:29 [INFO] [mgmt-auth-crtb-controller] Setting InitialRolesPopulated condition on project p-hc2qs
2018/11/19 10:23:29 [INFO] [mgmt-project-rbac-create] Updating project p-gtzwf
2018/11/19 10:23:29 [INFO] [mgmt-auth-crtb-controller] Creating clusterRole c-tfmr6-clusterowner
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for membership in project p-gtzwf for subject user-2fbzl
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating clusterRole p-hc2qs-projectowner
2018/11/19 10:23:29 [INFO] [mgmt-project-rbac-create] Updating project p-hc2qs
2018/11/19 10:23:29 [INFO] [mgmt-auth-crtb-controller] Setting InitialRolesPopulated condition on cluster
2018/11/19 10:23:29 [INFO] [mgmt-cluster-rbac-delete] Updating cluster c-tfmr6
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating clusterRole c-tfmr6-clustermember
2018/11/19 10:23:29 [INFO] [mgmt-auth-crtb-controller] Creating clusterRoleBinding for membership in cluster c-tfmr6 for subject user-2fbzl
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating clusterRoleBinding for membership in cluster c-tfmr6 for subject user-2fbzl
2018/11/19 10:23:29 [INFO] [mgmt-auth-crtb-controller] Creating role cluster-owner in namespace c-tfmr6
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for membership in project p-hc2qs for subject user-2fbzl
2018/11/19 10:23:29 [INFO] [mgmt-project-rbac-create] Updating project p-gtzwf
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating role project-owner in namespace c-tfmr6
2018/11/19 10:23:29 [INFO] [mgmt-project-rbac-create] Updating project p-hc2qs
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Updating clusterRoleBinding clusterrolebinding-fr2q8 for cluster membership in cluster c-tfmr6 for subject user-2fbzl
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for subject user-2fbzl with role project-owner in namespace
2018/11/19 10:23:29 [INFO] [mgmt-auth-crtb-controller] Creating roleBinding for subject user-2fbzl with role cluster-owner in namespace
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for subject user-2fbzl with role project-owner in namespace
2018/11/19 10:23:29 [INFO] [mgmt-project-rbac-create] Updating project p-hc2qs
2018/11/19 10:23:29 [INFO] [mgmt-auth-crtb-controller] Creating role cluster-owner in namespace p-gtzwf
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating role admin in namespace p-gtzwf
2018/11/19 10:23:29 [INFO] [mgmt-auth-crtb-controller] Creating roleBinding for subject user-2fbzl with role cluster-owner in namespace
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating role project-owner in namespace p-hc2qs
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating role project-owner in namespace p-gtzwf
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for subject user-2fbzl with role admin in namespace
2018/11/19 10:23:29 [INFO] [mgmt-auth-crtb-controller] Creating role cluster-owner in namespace p-hc2qs
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating role admin in namespace p-hc2qs
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for subject user-2fbzl with role project-owner in namespace
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for subject user-2fbzl with role admin in namespace
2018/11/19 10:23:29 [INFO] [mgmt-auth-prtb-controller] Creating roleBinding for subject user-2fbzl with role project-owner in namespace
2018/11/19 10:23:29 [INFO] [mgmt-auth-crtb-controller] Creating roleBinding for subject user-2fbzl with role cluster-owner in namespace
2018/11/19 10:23:29 [INFO] [mgmt-cluster-rbac-delete] Updating cluster c-tfmr6
2018/11/19 10:23:29 [INFO] [mgmt-cluster-rbac-delete] Updating cluster c-tfmr6
2018/11/19 10:23:29 [INFO] [mgmt-cluster-rbac-delete] Updating cluster c-tfmr6
2018/11/19 10:23:30 [INFO] stdout: Creating CA: management-state/node/nodes/bb-8/certs/ca.pem
2018/11/19 10:23:30 [INFO] stdout: Creating client certificate: management-state/node/nodes/bb-8/certs/cert.pem
2018/11/19 10:23:31 [INFO] stdout: Running pre-create checks...
2018/11/19 10:23:31 [INFO] stdout: Creating machine...
2018/11/19 10:23:31 [INFO] stdout: (bb-8) Creating SSH key...
2018/11/19 10:23:31 [INFO] stdout: (bb-8) Creating Hetzner server...
2018/11/19 10:23:32 [INFO] stdout: (bb-8)  -> Creating server bb-8[1391215] in create_server[8279609]
2018/11/19 10:23:35 [INFO] stdout: (bb-8)  -> Server bb-8[1391215]: Waiting to come up...
2018/11/19 10:23:48 [INFO] stdout: Waiting for machine to be running, this may take a few minutes...
2018/11/19 10:23:48 [INFO] stdout: Detecting operating system of created instance...
2018/11/19 10:23:48 [INFO] stdout: Waiting for SSH to be available...
2018/11/19 10:24:19 [INFO] stdout: Detecting the provisioner...
2018/11/19 10:24:19 [INFO] stdout: Provisioning with ubuntu(systemd)...
2018/11/19 10:24:56 [INFO] stdout: Installing Docker...
2018/11/19 10:25:25 [INFO] stdout: Copying certs to the local machine directory...
2018/11/19 10:25:27 [INFO] stdout: Copying certs to the remote machine...
2018/11/19 10:25:29 [INFO] stdout: Setting Docker configuration on the remote daemon...
2018/11/19 10:25:32 [INFO] stdout: Checking connection to Docker...
2018/11/19 10:25:32 [INFO] stdout: Docker is up and running!
2018/11/19 10:25:44 [INFO] Generating and uploading node config bb-8
2018/11/19 10:25:44 [INFO] 2018/11/19 10:25:44 http: TLS handshake error from 192.0.2.0:55296: acme/autocert: host not configured
2018/11/19 10:25:44 [INFO] Provisioning cluster [c-tfmr6]
2018/11/19 10:25:44 [INFO] Creating cluster [c-tfmr6]
2018/11/19 10:25:44 [INFO] cluster [c-tfmr6] provisioning: Building Kubernetes cluster
2018/11/19 10:25:44 [INFO] cluster [c-tfmr6] provisioning: [dialer] Setup tunnel for host [192.0.2.0]
2018/11/19 10:25:44 [INFO] cluster [c-tfmr6] provisioning: [network] Deploying port listener containers
2018/11/19 10:25:44 [INFO] cluster [c-tfmr6] provisioning: [network] Pulling image [rancher/rke-tools:v0.1.15] on host [192.0.2.0]
2018/11/19 10:25:44 [INFO] 2018/11/19 10:25:44 http: TLS handshake error from 192.0.2.0:55300: acme/autocert: host not configured
2018/11/19 10:25:44 [INFO] 2018/11/19 10:25:44 http: TLS handshake error from 192.0.2.0:55304: acme/autocert: host not configured
2018/11/19 10:25:45 [INFO] 2018/11/19 10:25:45 http: TLS handshake error from 192.0.2.0:55308: acme/autocert: host not configured
2018/11/19 10:25:46 [INFO] 2018/11/19 10:25:46 http: TLS handshake error from 192.0.2.0:55340: acme/autocert: host not configured
2018/11/19 10:25:48 [INFO] 2018/11/19 10:25:48 http: TLS handshake error from 192.0.2.0:55368: acme/autocert: host not configured
2018/11/19 10:25:52 [INFO] 2018/11/19 10:25:52 http: TLS handshake error from 192.0.2.0:55370: acme/autocert: host not configured
2018/11/19 10:25:53 [INFO] cluster [c-tfmr6] provisioning: [network] Successfully pulled image [rancher/rke-tools:v0.1.15] on host [192.0.2.0]
2018/11/19 10:25:54 [INFO] cluster [c-tfmr6] provisioning: [network] Successfully started [rke-etcd-port-listener] container on host [192.0.2.0]
2018/11/19 10:25:54 [INFO] cluster [c-tfmr6] provisioning: [network] Successfully started [rke-cp-port-listener] container on host [192.0.2.0]
2018/11/19 10:25:55 [INFO] cluster [c-tfmr6] provisioning: [network] Successfully started [rke-worker-port-listener] container on host [192.0.2.0]
2018/11/19 10:25:55 [INFO] cluster [c-tfmr6] provisioning: [network] Port listener containers deployed successfully
2018/11/19 10:25:55 [INFO] cluster [c-tfmr6] provisioning: [network] Running control plane -> etcd port checks
2018/11/19 10:25:56 [INFO] cluster [c-tfmr6] provisioning: [network] Successfully started [rke-port-checker] container on host [192.0.2.0]
2018/11/19 10:25:56 [INFO] cluster [c-tfmr6] provisioning: [network] Running control plane -> worker port checks
2018/11/19 10:25:57 [INFO] cluster [c-tfmr6] provisioning: [network] Successfully started [rke-port-checker] container on host [192.0.2.0]
2018/11/19 10:25:57 [INFO] cluster [c-tfmr6] provisioning: [network] Running workers -> control plane port checks
2018/11/19 10:25:58 [INFO] cluster [c-tfmr6] provisioning: [network] Successfully started [rke-port-checker] container on host [192.0.2.0]
2018/11/19 10:25:58 [INFO] cluster [c-tfmr6] provisioning: [network] Skipping kubeapi port check
2018/11/19 10:25:58 [INFO] cluster [c-tfmr6] provisioning: [network] Removing port listener containers
2018/11/19 10:25:58 [INFO] cluster [c-tfmr6] provisioning: [remove/rke-etcd-port-listener] Successfully removed container on host [192.0.2.0]
2018/11/19 10:25:59 [INFO] 2018/11/19 10:25:59 http: TLS handshake error from 192.0.2.0:55372: acme/autocert: host not configured
2018/11/19 10:25:59 [INFO] cluster [c-tfmr6] provisioning: [remove/rke-cp-port-listener] Successfully removed container on host [192.0.2.0]
2018/11/19 10:26:00 [INFO] cluster [c-tfmr6] provisioning: [remove/rke-worker-port-listener] Successfully removed container on host [192.0.2.0]
2018/11/19 10:26:00 [INFO] cluster [c-tfmr6] provisioning: [network] Port listener containers removed successfully
2018/11/19 10:26:00 [INFO] cluster [c-tfmr6] provisioning: [certificates] Attempting to recover certificates from backup on [etcd,controlPlane] hosts
2018/11/19 10:26:00 [INFO] cluster [c-tfmr6] provisioning: [certificates] Successfully started [cert-fetcher] container on host [192.0.2.0]
2018/11/19 10:26:01 [INFO] cluster [c-tfmr6] provisioning: [certificates] No Certificate backup found on [etcd,controlPlane] hosts
2018/11/19 10:26:01 [INFO] cluster [c-tfmr6] provisioning: [certificates] Generating CA kubernetes certificates
2018/11/19 10:26:01 [INFO] cluster [c-tfmr6] provisioning: [certificates] Generating Kubernetes API server certificates
2018/11/19 10:26:01 [INFO] cluster [c-tfmr6] provisioning: [certificates] Generating Kube Controller certificates
2018/11/19 10:26:01 [INFO] cluster [c-tfmr6] provisioning: [certificates] Generating Kube Scheduler certificates
2018/11/19 10:26:01 [INFO] cluster [c-tfmr6] provisioning: [certificates] Generating Kube Proxy certificates
2018/11/19 10:26:02 [INFO] cluster [c-tfmr6] provisioning: [certificates] Generating Node certificate
2018/11/19 10:26:02 [INFO] cluster [c-tfmr6] provisioning: [certificates] Generating admin certificates and kubeconfig
2018/11/19 10:26:02 [INFO] cluster [c-tfmr6] provisioning: [certificates] Generating etcd-192.0.2.0 certificate and key
2018/11/19 10:26:03 [INFO] cluster [c-tfmr6] provisioning: [certificates] Generating Kubernetes API server aggregation layer requestheader client CA certificates
2018/11/19 10:26:03 [INFO] cluster [c-tfmr6] provisioning: [certificates] Generating Kubernetes API server proxy client certificates
2018/11/19 10:26:03 [INFO] cluster [c-tfmr6] provisioning: [certificates] Temporarily saving certs to [etcd,controlPlane] hosts
2018-11-19 10:26:07.962389 I | mvcc: store.index: compact 453157
2018-11-19 10:26:07.971374 I | mvcc: finished scheduled compaction at 453157 (took 6.234591ms)
2018/11/19 10:26:10 [INFO] cluster [c-tfmr6] provisioning: [certificates] Saved certs to [etcd,controlPlane] hosts
2018/11/19 10:26:10 [INFO] cluster [c-tfmr6] provisioning: [reconcile] Reconciling cluster state
2018/11/19 10:26:10 [INFO] cluster [c-tfmr6] provisioning: [reconcile] This is newly generated cluster
2018/11/19 10:26:10 [INFO] cluster [c-tfmr6] provisioning: [certificates] Deploying kubernetes certificates to Cluster nodes
2018/11/19 10:26:12 [INFO] 2018/11/19 10:26:12 http: TLS handshake error from 192.0.2.0:55374: acme/autocert: host not configured
2018/11/19 10:26:15 [INFO] cluster [c-tfmr6] provisioning: Successfully Deployed local admin kubeconfig at [management-state/rke/rke-047776818/kube_config_cluster.yml]
2018/11/19 10:26:15 [INFO] cluster [c-tfmr6] provisioning: [certificates] Successfully deployed kubernetes certificates to Cluster nodes
2018/11/19 10:26:15 [INFO] cluster [c-tfmr6] provisioning: Pre-pulling kubernetes images
2018/11/19 10:26:15 [INFO] cluster [c-tfmr6] provisioning: [pre-deploy] Pulling image [rancher/hyperkube:v1.11.3-rancher1] on host [192.0.2.0]
2018/11/19 10:26:38 [INFO] 2018/11/19 10:26:38 http: TLS handshake error from 192.0.2.0:55422: acme/autocert: host not configured
2018/11/19 10:27:04 [INFO] cluster [c-tfmr6] provisioning: [pre-deploy] Successfully pulled image [rancher/hyperkube:v1.11.3-rancher1] on host [192.0.2.0]
2018/11/19 10:27:04 [INFO] cluster [c-tfmr6] provisioning: Kubernetes images pulled successfully
2018/11/19 10:27:04 [INFO] cluster [c-tfmr6] provisioning: [etcd] Building up etcd plane..
2018/11/19 10:27:04 [INFO] cluster [c-tfmr6] provisioning: [etcd] Pulling image [rancher/coreos-etcd:v3.2.18] on host [192.0.2.0]
2018/11/19 10:27:07 [INFO] cluster [c-tfmr6] provisioning: [etcd] Successfully pulled image [rancher/coreos-etcd:v3.2.18] on host [192.0.2.0]
2018/11/19 10:27:08 [INFO] cluster [c-tfmr6] provisioning: [etcd] Successfully started [etcd] container on host [192.0.2.0]
2018/11/19 10:27:08 [INFO] cluster [c-tfmr6] provisioning: [etcd] Successfully started [rke-log-linker] container on host [192.0.2.0]
2018/11/19 10:27:08 [INFO] cluster [c-tfmr6] provisioning: [remove/rke-log-linker] Successfully removed container on host [192.0.2.0]
2018/11/19 10:27:08 [INFO] cluster [c-tfmr6] provisioning: [etcd] Successfully started etcd plane..
2018/11/19 10:27:08 [INFO] cluster [c-tfmr6] provisioning: [controlplane] Building up Controller Plane..
2018/11/19 10:27:09 [INFO] cluster [c-tfmr6] provisioning: [controlplane] Successfully started [kube-apiserver] container on host [192.0.2.0]
2018/11/19 10:27:09 [INFO] cluster [c-tfmr6] provisioning: [healthcheck] Start Healthcheck on service [kube-apiserver] on host [192.0.2.0]
2018/11/19 10:27:30 [INFO] 2018/11/19 10:27:30 http: TLS handshake error from 192.0.2.0:55608: acme/autocert: host not configured
2018/11/19 10:27:59 [ERROR] cluster [c-tfmr6] provisioning: [controlPlane] Failed to bring up Control Plane: Failed to verify healthcheck: Failed to check https://localhost:6443/healthz for service [kube-apiserver] on host [192.0.2.0]: Get https://localhost:6443/healthz: can not build dialer to c-tfmr6:m-p6qc2, log: I1119 10:27:26.917706       1 storage_rbac.go:276] created rolebinding.rbac.authorization.k8s.io/system:controller:bootstrap-signer in kube-public
2018/11/19 10:27:59 [ERROR] ClusterController c-tfmr6 [cluster-provisioner-controller] failed with : [controlPlane] Failed to bring up Control Plane: Failed to verify healthcheck: Failed to check https://localhost:6443/healthz for service [kube-apiserver] on host [192.0.2.0]: Get https://localhost:6443/healthz: can not build dialer to c-tfmr6:m-p6qc2, log: I1119 10:27:26.917706       1 storage_rbac.go:276] created rolebinding.rbac.authorization.k8s.io/system:controller:bootstrap-signer in kube-public

I'm having the same issue. Ref: https://gist.github.com/nachokb/27f5f33ce7e1de261f6581a0df8efc6a (run command and rancher log).

host has public IP;
DNS is set up;
I can access the app if I ignore the invalid cert warnings;
ports 80 an 443 are exposed (as per the run command's -p arguments);
host has just been provisioned (there are no other apps listening);
error says http: TLS handshake error from <PUBLIC_IP>:39010: acme/autocert: host not configured;

this comes up sometimes 10 times a second;
port changes every time error shows up;
those ports are not exposed, and I don't think they could be either;

I followed instructions from Option 2-D in the Single Node Install Installation Guide

please check https://github.com/golang/crypto/pull/63

in my case I had set it yo using a different subdomain, then changed it
also changed it in settings, but that was not enough
as it was a new installation I just started over again

Root cause of this error is known, if this is reproducible on latest version, please supply steps to reproduce from scratch so we can investigate.


text:
import RKE cluster and be editable

It would be nice to be able to import an existing RKE cluster and be able to fully manage and edit the cluster using rancher as it would have been created by rancher.
This makes it more attractive to migrate to rancher if you already have an RKE cluster and now want to have all the additional features that rancher provides such as node pools and adding nodes by a single command on the host.

See https://github.com/rancher/rancher/issues/22763

authors: robinbraemer superseb


text:
[RFE] Dashboard UI request for detecting feature flag

SURE-5023

#38445

moving to QA

✅ PASSED
Reproduction Environment
Not required.

Validation Environment

Component
Version / Type

Rancher version
v2.7.0-rc3

Installation option
Helm (high availability)

If Helm Chart k8s cluster
v1.24.6+k3s1

Cert Details
Let's Encrypt / traefik

k3s ha external db
Aurora MySQL 5.7.mysql_aurora.2.10.2

Helm version
v2.16.8-rancher2

Downstream cluster type
RKE1 Linode

Downstream K8s version
v1.24.6

Authentication providers enabled
local

Logged in user role
Administrator

Browser type
Google Chrome

Browser version
105.0.5195.125 (Official Build) (x86_64)

Validation steps

With a Rancher server that's already setup
Using postman or hoppscotch with no authentication
Make a GET request to https://<rancher-server>/rancherversion
Received the following response

{
  "Version": "v2.7.0-rc3",
  "GitCommit": "314e690a1",
  "RancherPrime": "false"
}

Additional Info
RESULTS
✅ Expected
Expected to get the response noted above when hitting the /rancherversion endpoint while unauthenticated
✅ Actual
Received the expected response while unauthenticated
Additional Checks
Test Plan

Test
Steps
Expected
Actual & Pass/Fail

Upgrade from 2.6.7 Rancher

Starting with a 2.6.7 Rancher
Upgrade Rancher to 2.7.0-rc3
Check the /rancherversion endpoint

Expected: Receive the expected json response
Actual: Pass/Fail: ✅PASS

Hitting the endpoint on a 2.7-head version of Rancher

Setup a Rancher server that's using v2.7-head as the version
Make a GET request to the /rancherversion endpoint

Expected: Receive the git commit as the version
Actual: Received the version as the git commitPass/Fail: ✅PASS-->

Set RANCHER_PRIME env to true

Create a v2.7-0-rc3 rancher server
Set an env var of RANCHER_PRIME with the key true
Check the rancher version endpoint

Expected: For the endpoint response to reflect rancher prime env as true if set as such
Actual: JSON response shows rancher prime env set to truePass/Fail: ✅PASS

authors: brudnak samjustus


text:
[BUG] Rancher deletes Cluster API Cluster resources that it did not create

Rancher Server Setup

Rancher version: 2.6.9
Installation option: Helm chart on a kubeadm cluster
Proxy/Cert Details:

Information about the Cluster

Kubernetes version:
Cluster Type (Local/Downstream): local

User Information
Admin User
Describe the bug
When one deteles a Cluster.provisioning.cattle.io resource, if there is a  Cluster.cluster.x-k8s.io resource (that a user may have created in the context of a use of ClusterAPI) with the same name, Rancher will delete that one as well, merely based on name matching only and despite the fact that Rancher has no relationship with this resource.
To Reproduce

create a Cluster.cluster.x-k8s.io resource with name foo in a namespace
create a Cluster.provisioning.cattle.io resource with name foo in a namespace
delete this Cluster.provisioning.cattle.io resource

Result
The Cluster.cluster.x-k8s.io resource is deleted.
Expected Result
The Cluster.cluster.x-k8s.io resource should not be deleted.

ping @richardcase, as a follow up to our discussions

In the remove handler for Cluster.provisioning.cattle.io if a CAPI Cluster (Cluster.cluster.x-k8s.io) exists with the same name & namespace then it is deleted without checking ownership reference, labels/annotations:
https://github.com/rancher/rancher/blob/release/v2.7/pkg/controllers/provisioningv2/cluster/remove.go#L95:L106

@tmmorin - also to confirm you use embedded-cluster-api=false to disable the embedded CAPI controllers? (because you are using the standard CAPI controllers/providers)

@tmmorin - also to confirm you use embedded-cluster-api=false to disable the embedded CAPI controllers? (because you are using the standard CAPI controllers/providers)

yes, indeed
we install rancher with the official Helm chart, with this in the values:
        features: embedded-cluster-api=false,provisioningv2=true

Internal reference: SURE-5768

https://github.com/rancher/rancher/pull/40714

moving it to Review state since the linked PR ^ is not merged.

@cpinjani - these are the instructions i used.

Check if you have a docker network called kind

docker network ls

If its not listed (i.e. you haven't used kind on the machine before) run the following:

docker network create \
	  --driver=bridge \
	  --subnet=172.19.0.0/16 \
	  --gateway=172.19.0.1 \
	  --opt "com.docker.network.bridge.enable_ip_masquerade"="true" \
	  --opt "com.docker.network.driver.mtu"="1500" \
	  kind

create a file called k3d-capd.yaml to configure k3d for CAPD

apiVersion: k3d.io/v1alpha5
kind: Simple
metadata:
	name: rancher-test
servers: 1
agents: 0
image: rancher/k3s:v1.25.9-k3s1
network: kind
volumes:
	- volume: /var/run/docker.sock:/var/run/docker.sock
	  nodeFilters:
	    - server:*

Create the k3d management cluster

k3d cluster create --config k3d-capd.yaml

Install cert manager

kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.1/cert-manager.crds.yaml
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.5.1

Install CAPI with the docker provider (**If this is done after Rancher, then Rancher fails to start)

export EXP_CLUSTER_RESOURCE_SET=true
clusterctl init -i docker

Install Rancher with the embedded capi feature disabled

kubectl create namespace cattle-system
helm install rancher rancher-stable/rancher --namespace cattle-system --set bootstrapPassword=admin --set replicas=1  --set hostname=tunnel.fruitcase.dev --set 'extraEnv[0].name=CATTLE_FEATURES' --set 'extraEnv[0].value=embedded-cluster-api=false' --set global.cattle.psp.enabled=false --version 2.7.3

Do whatever you need to do to expose your cluster (i.e. ngrok, inlets)
Create the capi cluster definition (note the name is test1)

export CONTROL_PLANE_MACHINE_COUNT=1
export WORKER_MACHINE_COUNT=1
export KUBERNETES_VERSION=v1.26.4

clusterctl generate cluster test1 --target-namespace fleet-default --from https://github.com/capi-samples/opensuse-23/blob/main/templates/kubeadm-docker.yaml > cluster.yaml

Apply the cluster to capi/rancher cluster:

kubectl apply -f cluster.yaml

Wait for the control plane machine to be ready

kubectl get machines -A -w

Import the CAPI cluster into Rancher

In Rancher Manager go to Cluster Management
Import Cluster with type Generic and set the name to test1

Delete the cluster from Rancher:

In Rancher Manager go to Cluster Management
Tick the box on the left to select test1 cluster
Click Delete button

Observe if the test1 CAPI cluster has been deleted or not:

kubectl get clusters.cluster.x-k8s.io -A

If the fix works it should not delete the CAPI cluster

@richardcase Able to reproduce with above steps on reported version 2.6.9, will proceed with validation on fixed version.
Imported CAPI cluster into rancher:
$ kubectl get clusters.cluster.x-k8s.io -A
NAMESPACE       NAME    PHASE         AGE   VERSION
fleet-default   test1   Provisioned   14m

$ kubectl get Cluster.provisioning.cattle.io -A
NAMESPACE       NAME    READY   KUBECONFIG
fleet-local     local   true    local-kubeconfig
fleet-default   test1   true    test1-kubeconfig

After deleting imported cluster in Rancher:
$ kubectl get Cluster.provisioning.cattle.io -A
NAMESPACE     NAME    READY   KUBECONFIG
fleet-local   local   true    local-kubeconfig

$ kubectl get clusters.cluster.x-k8s.io -A
No resources found

As the fix is reverted, moving back to "In-progress"
cc: @richardcase

too late for 2.7.5, moving to Q3

We fixed the original issue but due to a change elsewhere we were unable to verify it. This was due to another issue with the 2 resources named the same related to the kubeconfig secret.
We need to take into account both aspects into account when fixing this.

Validation results on v2.8-ef234b38637b8ab5c73f81e2104124e47ae71bd2-head
Unable to reproduce this issue. @alexander-demicev Please review the issue for closure.
Cluster.provisioning.cattle.io resource name and display names are now different.
For eg.
Display name on Rancher UI: cluster1
Resource name:
$ kubectl get Cluster.provisioning.cattle.io -A
NAMESPACE       NAME      READY   KUBECONFIG
fleet-default   c-wm4qd   true    c-wm4qd-kubeconfig
fleet-local     local     true    local-kubeconfig

Steps

Create a Cluster.provisioning.cattle.io resource with name foo in a namespace
Create a Cluster.cluster.x-k8s.io resource with name foo in a namespace
Delete this Cluster.provisioning.cattle.io resource

Results

Create a Cluster.cluster.x-k8s.io resource with name same as Cluster.provisioning.cattle.io resource name

$ kubectl get Cluster.provisioning.cattle.io -A
NAMESPACE       NAME      READY   KUBECONFIG
fleet-default   c-67xdp   true    c-67xdp-kubeconfig
fleet-local     local     true    local-kubeconfig

$ kubectl get clusters.cluster.x-k8s.io
NAME      PHASE         AGE     VERSION
c-67xdp   Provisioned   3m46s

Import CAPI cluster into Rancher, importing using resource name not allowed

Import using display name

$ kubectl get Cluster.provisioning.cattle.io -A
NAMESPACE       NAME       READY   KUBECONFIG
fleet-default   c-67xdp    true    c-67xdp-kubeconfig
fleet-default   cluster1   true    cluster1-kubeconfig
fleet-local     local      true    local-kubeconfig

Delete Cluster.provisioning.cattle.io resource
CAPI cluster is intact:

$ kubectl get clusters.cluster.x-k8s.io
NAME       PHASE         AGE     VERSION
c-67xdp   Provisioned   8m43s

As of today, we can no longer reproduce this and consider it solved.

authors: cpinjani kkaempf richardcase salasberryfin sowmyav27 tmmorin


text:
Can't create Environment using Azure AD Authentication

Rancher Version: Prachi Azure Master build
Steps to Reproduce:

Authenticate using Azure AD
Try to create a environment

Results: Error "Validation failed in API: externalIdType is not a valid option".  azuread_user and azuread_group are missing from the enumeration for projectMember.
Expected:  Add missing fields so I can create environments.

Version - master 6/16
Verified fixed