Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
vasilatos v
@vasgitlab_gitlab
I faced error
not found such file -- util/vmdb-logger
during bin/update
Adam Grare
@agrare
@vasgitlab_gitlab make sure your core repository is up to date (e.g. git pull upstream master)
Jay Carman
@jaywcarman

I pulled the latest core master this morning (80714fcf18), updated everything else, and now am unable to authenticate to the web interface. Seeing the following error:

[----] F, [2021-12-06T07:58:11.743296 #679013:e199408] FATAL -- development: Error caught: [TypeError] can't cast Rack::Session::SessionId

Trying to figure out if this is something local to my env or if I pulled in a bug when I updated.

Adam Grare
@agrare
@jaywcarman that's not just you I'm also seeing that
Jay Carman
@jaywcarman

Pushed full logs up to the tmp branch:
https://raw.githubusercontent.com/jaywcarman/manageiq/log_tmp/log.development.20211206.log

@agrare nice to know it's not something I goofed :)

Adam Grare
@agrare
there was a new version of the dalli gem released on friday (3.1.0)
you can lock down to ~> 3.0.0 until we fix it
Gemfile
-gem "dalli",                            "~>3.0",             :require => false
+gem "dalli",                            "~>3.0.0",             :require => false
Jay Carman
@jaywcarman
Perfect, thanks!
Jason Frey
@Fryguy
dalli bumped - we noticed on friday and have to lockdown - cc @bdunne / @jrafanie
Brandon Dunne
@bdunne
oh no
Jason Frey
@Fryguy
I think they changed the method we patched
Adam Grare
@agrare

https://github.com/petergoldstein/dalli/blob/main/History.md

BREAKING CHANGE .... minor version bump :)

Jason Frey
@Fryguy
ugh - glad they don't follow semver
Adam Grare
@agrare
looking back they only did a major version bump for serious overhauls, they do minor bumps for breaking changes
might want to consider ~> to the patch version
Jason Frey
@Fryguy
yeah was just thinking that
maybe a comment too in the Gemfile that they don't follow semver properly
Adam Grare
@agrare
:+1:
Jason Frey
@Fryguy
Joe Rafaniello
@jrafanie
I can take a look unless you've already got something
Joe Rafaniello
@jrafanie
well, it's private and I put the message knowing that they might rename/remove it
;-)
Aleksei Pilnik
@apilnik
Hello!
I would like to translate user interface to russian or ukranian. Which file i should edit? Will manageiq.po and .yml files in /var/www/miq/vmdb/locale/ be enough or I need something else???
_
Jason Frey
@Fryguy
hi @apilnik ...that would be awesome!
yes, you'd create a .po file to start using the .pot file as a template
and also a new .yml file
Aleksei Pilnik
@apilnik
@Fryguy okay, I will let you know when finish translation
Jason Frey
@Fryguy
cc @chessbyte ^
Joe Rafaniello
@jrafanie
@agrare @Fryguy I have it working with dalli 3.1.0. I'm not too happy that you have to cast the session_id to string though
diff --git a/app/models/user.rb b/app/models/user.rb
index 5a0885121a..0548132b66 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -233,7 +233,7 @@ class User < ApplicationRecord
     return unless request
     return unless (session_id = request.session_options[:id])

-    sessions << Session.find_or_create_by(:session_id => session_id)
+    sessions << Session.find_or_create_by(:session_id => session_id.to_s)
   end

   def broadcast_revoke_sessions
diff --git a/lib/extensions/rack_session_dalli_patch.rb b/lib/extensions/rack_session_dalli_patch.rb
index 4c4ec35d34..317b684811 100644
--- a/lib/extensions/rack_session_dalli_patch.rb
+++ b/lib/extensions/rack_session_dalli_patch.rb
@@ -4,7 +4,7 @@ require "rack/session/dalli"
 module RackSessionDalliPatch
   def delete_sessions(session_ids)
     session_ids.each do |session_id|
-      destroy_session(ManageIQ::Session.fake_request.env, session_id, :drop => true)
+      delete_session(ManageIQ::Session.fake_request.env, session_id, :drop => true)
     end
   end

@@ -12,7 +12,7 @@ module RackSessionDalliPatch
   # cause a load to occur. Consequently, we need to manage things
   # carefully to prevent a deadlock between the Rails Interlock and
   # Dalli's own exclusive lock.
-  def with_block(*args)
+  def with_dalli_client(*args)
     ActiveSupport::Dependencies.interlock.permit_concurrent_loads do
       super do |dc|
         ActiveSupport::Dependencies.interlock.running do
@@ -27,7 +27,7 @@ end
 # with_lock was renamed to with_block with a slightly different interface.
 # All versions since 2.7.7 have with_block now.
 # Additionally, we'll detect and warn if the method we depend on in our prepended module doesn't exist before we try to prepend it.
-%w[with_block destroy_session].each do |method|
+%w[with_dalli_client delete_session].each do |method|
   begin
     Rack::Session::Dalli.instance_method(method)
   rescue NameError => err
Joe Rafaniello
@jrafanie
Oh great, some pages are hung. It's fun dealing with upgrades of gems with our monkey patches for deadlock avoidance. :eyes:
I'll just lock dalli for now. I'm not sure how long this will take
Joe Rafaniello
@jrafanie
Jason Frey
@Fryguy
I'm marking that morphy/yes?
IMO, we will hit the same issues on morphy, and since we are actively trying to lock it down, we might as well backport this. cc @bdunne
Brandon Dunne
@bdunne
yeah, I think that needs to be morphy/yes
Joe Rafaniello
@jrafanie
Thanks, agreed
Joe Rafaniello
@jrafanie
I swear... I've got dalli 3.1.0 running with my changes to make our existing patches work with 3.1.0 but it hangs on some pages. I stop and add the rails debug locks middleware so I can see where it's deadlocking and guess what happens... it doesn't hang
Jason Frey
@Fryguy
:neutral_face:
Joe Rafaniello
@jrafanie
heisenbug!
zackary-deems
@zackary-deems
I attempt to list our configured alerts (we have >200) and it renders properly at 20 items. If I change it to show ALL of them... the UI just sits there with the spinner icon and never comes back. When I poke around in the logs, I find this in the apache error log:
[Wed Dec 08 10:40:37.127971 2021] [proxy_http:error] [pid 201586:tid 140171787233024] [client ...:56674] AH01114: HTTP: failed to make connection to backend: 0.0.0.0, referer: https://.../miq_alert/show_list
[Wed Dec 08 10:40:37.129286 2021] [proxy:error] [pid 201586:tid 140171787233024] (111)Connection refused: AH00957: HTTP: attempt to connect to 0.0.0.0:4004 (0.0.0.0) failed
Jason Frey
@Fryguy
nice!
do you see anyhting in the postgresql logs?
zackary-deems
@zackary-deems
hmm
Jason Frey
@Fryguy
also, if you can enable debug mode for the logs, then we can see the individual queries....high chance it's an N+1 issue
zackary-deems
@zackary-deems
See, now you have me poking around in other logs, and I see things like this that SOUND bad..
2021-12-08 10:40:37 EST:100.66.3.19(41762):61b0d1f5.da09:[unknown]@[unknown]:[55817]:FATAL: unsupported frontend protocol 1234.5680: server supports 2.0 to 3.0