Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

haproxy multiselect menus messed up after 18.7 update #769

Closed
billyburly opened this issue Aug 1, 2018 · 38 comments
Closed

haproxy multiselect menus messed up after 18.7 update #769

billyburly opened this issue Aug 1, 2018 · 38 comments
Assignees
Labels
bug Production bug

Comments

@billyburly
Copy link

After the update to 18.7 some of the multiselect menus in haproxy are messed up. Randomly displays the rules from one of the public frontends in the top right. Some of the multiselects have uuids instead of text.

image
image

@fichtner
Copy link
Member

fichtner commented Aug 1, 2018

Can you try to clear your browser cache?

@fichtner fichtner added the support Community support label Aug 1, 2018
@billyburly
Copy link
Author

persists with cleared cache. same issue in both firefox and chrome

@fichtner
Copy link
Member

fichtner commented Aug 1, 2018

You're right. This is caused by the haproxy.general.tuning.ssl_bindOptions field where there is an auto-complete which is shown in the upper left corner because it's pushed into an inconvenient place. I'll take a closer look.

fichtner added a commit to opnsense/core that referenced this issue Aug 1, 2018
Solves the reported issue but may not be the final fix.
May be a tokenizer library issue...

PR: opnsense/plugins#769
@fichtner fichtner added bug Production bug and removed support Community support labels Aug 1, 2018
@fichtner fichtner self-assigned this Aug 1, 2018
@fichtner
Copy link
Member

fichtner commented Aug 1, 2018

A work in progress is here: opnsense/core@1a915fe8

You can try it from the console:

# opnsense-patch 1a915fe8

@AdSchellevis do you see what's going on here?

@AdSchellevis
Copy link
Member

@fichtner not instantly, I've had some small glitches with the new tokeniser when working on the firewall aliases (I think it was this https://github.com/opnsense/core/blob/1a915fe80ca8c2c91cf4c1fcbc30ab630adcecca/src/opnsense/mvc/app/views/OPNsense/Firewall/alias.volt#L103), but I'm not sure 100% what the issue in this case is. I will try to take a look later, using the HAProxy plugin,

@fichtner
Copy link
Member

fichtner commented Aug 1, 2018

looks similar. somehow the autocomplete window is shown, mostly due to bad style dropping it into the body...

https://github.com/opnsense/core/blob/1a915fe80ca8c2c91cf4c1fcbc30ab630adcecca/src/opnsense/www/js/tokenize2.js#L686-L687

@digitalcohesion
Copy link

After applying the patch, it's improved in Safari, but I have to click in and out of the field to be able to type anything, and it also seems that Safari wants to offer to complete the field with contact addresses as well. This causes visual issues because of the placement of the menu widget. In the screenshot, what's actually typed into the field is 192.168, but the first two characters get cut off as the autofill menu is placed to the left instead of the right as usual.

screen shot 2018-08-01 at 9 35 26 am

@digitalcohesion
Copy link

Also I noticed that some of my settings don't show in the interface anymore. For example, the servers field on the Edit Backend page is blank, but I do have a server set for that backend, and it is in the haproxy.conf file when viewed in the shell.

screen shot 2018-08-01 at 2 38 21 pm

@ikke-t
Copy link

ikke-t commented Aug 7, 2018

I also tried this patch. It did not fix it. The extra items menu disappeared from the corner, but now all the certs and rules are missing e.g. from the settings panel of Virtual Services -> Public Services -> Edit.

I tried using both FF and Chrome here. The developer console shows no error. I tried also with private mode,

@digitalcohesion
Copy link

Yes, I ended up reverting to the previous release which is working quite nicely.

@fichtner
Copy link
Member

fichtner commented Aug 7, 2018 via email

@AdSchellevis
Copy link
Member

likely this dragonofmercy/Tokenize2#38 issue, should be fixed with opnsense/core@542331c

to install:

opnsense-patch 542331

and then refresh your browser cache.

@astrandb
Copy link

astrandb commented Aug 7, 2018

@fichtner @AdSchellevis
The suggested patches do not help.
I can give you access to my test router where the problem is easy to see.

@AdSchellevis AdSchellevis reopened this Aug 7, 2018
@AdSchellevis
Copy link
Member

@astrandb I seem to be able to reproduce the same here, but for some odd reason the patch works on the current development branch.

@AdSchellevis
Copy link
Member

Tried some different things, the problem seems to be the loading time of the modal in combination with the way Tokenizer2 seems to determine it's z-index. Slight variations cause the issue to vanish, but no concrete fix yet (on my end with safari and the patch installed, the issue doesn't exist).

The zIndexMargin parameter doesn't seem to resolve the issue either.

@AdSchellevis
Copy link
Member

@astrandb can you try opnsense/core@31e3f74 ?

opnsense-patch 31e3f7

@fichtner
Copy link
Member

fichtner commented Aug 8, 2018

From here this works better, I can now see the UUID display issue, but not sure what causes it.

@fichtner
Copy link
Member

fichtner commented Aug 8, 2018

@astrandb
Copy link

astrandb commented Aug 9, 2018

@AdSchellevis patch 31e3f7 takes care of the misplaced multiselect menu. The UUID display issue is still there.

Same result with Edge and Chrome

@mimugmail
Copy link
Member

@AdSchellevis @fichtner Have you tried to remove <style>tokenize</style> from a multiselect field? I know this is just a workaround, but it helped my with the identical problem.

@fichtner
Copy link
Member

fichtner commented Aug 9, 2018

yes, but @fraenki insists on tokenize, which is a valid position ;) #725

@AdSchellevis
Copy link
Member

@astrandb I missed that one, have to look into the token content, it seems to misplace our items here.

@mimugmail
Copy link
Member

Oh .. sort order, indeed :(

AdSchellevis added a commit to opnsense/core that referenced this issue Aug 9, 2018
@AdSchellevis
Copy link
Member

@astrandb the uuid issue should be fixed with opnsense/core@6e759fb , can you try it out?

@astrandb
Copy link

astrandb commented Aug 9, 2018

@AdSchellevis: Looking good on my test router.

@AdSchellevis
Copy link
Member

@astrandb thanks for confirming! I'll close the issue then

fichtner pushed a commit to opnsense/core that referenced this issue Aug 9, 2018
@fichtner fichtner assigned AdSchellevis and unassigned fichtner Aug 9, 2018
@fichtner
Copy link
Member

fichtner commented Aug 9, 2018

Added to 18.7.1 which hits early next week. Thanks all :)

@digitalcohesion
Copy link

Nice. Thanks for fixing this one. I'll try the upgrade again with 18.7.1.

@ikke-t
Copy link

ikke-t commented Aug 10, 2018

I can also confirm it seems to work now. I applied patches: 31e3f7 and 6e759fb. The first one fixes the extra menu in the corner, and the second one hides the uuids and puts real names into place.

Thanks a lot for fixing it :)

@addy90
Copy link

addy90 commented Aug 10, 2018

Great, thank you for fixing - was just stumbling over this issue, and it is already fixed! Kudos for OPNsense! 👍

@ghostwheel42
Copy link

@AdSchellevis your patches fix the messed up menu, but i think the sort order isn't retained anymore
(my haproxy warns about a http-request rule placed after a use-backend rule in a frontend)

@AdSchellevis
Copy link
Member

@ghostwheel42 can you open a new ticket for this (in core)? I'm not sure this is related to the selectpicker itself, at a first glance the service seems to be returning the items sorted differently too.

@fichtner
Copy link
Member

fichtner commented Aug 15, 2018

probably related to 701b3812f and c966d83c5954a

@AdSchellevis
Copy link
Member

@fichtner I don't expect this is the issue, the tokeniser is there, the service seems to supply the content alphabetically ordered (on my end).

@skynick11
Copy link

skynick11 commented Aug 15, 2018

The first screenshot shows that three fields are highlighted at the same time (and they are not the only "highlighted, but not selected" fields at the "HAproxy" plugin page). The similar thing can be found at the "bind" plugin page.

If click to the "highlighted" field, and after that click to some another field - the first field becomes "normal".

Is this a "known issue" or is it recommended to open a new ticket?

@AdSchellevis
Copy link
Member

@ghostwheel42 I'm not 100% we're looking at the same case, but I checked "Public Services" and traced the rules there, they use a ModelRelationField which is isn't (and never was) sorted by the order in the selectbox.

So... if we're looking at the same field/type, I'm afraid @fraenki made the false assumption that those are ordered by input and this is actually a bug in the HAProxy plugin. I'm not sure why ordering matters here, but if it does and needs the field type that's in there now, I can't fix it at the moment.

for reference : https://github.com/opnsense/core/blob/18.7.1/src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/ModelRelationField.php#L196-L203

@ghostwheel42
Copy link

ghostwheel42 commented Aug 15, 2018

@AdSchellevis you are probably right - the "Select Rules" under "Public Service" never were sorted.
So it's a bug/feature request for the HAProxy plugin.
Ordering matters, because the rules are nothing more than "if this then that" and it's easy to have a case rule that matches more than one rule. For example:
a) if path begins with /foo, then redirect to foo.domain.tld
b) if path begins with /foo/bar, then redirect to bar.domain.tld
When a) is before b), then b) will never match.

@AdSchellevis
Copy link
Member

maybe a weight on the rule could be an easy fix to achieve the desired behaviour, but that's just a possible solution for the issue. maybe it's better to open a new feature request and discuss with @fraenki

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

No branches or pull requests

10 participants