Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    François Armand
    @fanf
    (most likely person who can know something about that ?)
    Alexis Mousset
    @amousset
        root_server.(!role_rudder_db_server_defined|role_rudder_server_root)::
          "host" string => "localhost";
    
        root_server.role_rudder_db_server_defined.!role_rudder_server_root::
          "host" string => "${rudder_servers_by_role.roles[rudder-db]}";
    seems like we're hitting the first case while it should be the second
    I think the problem might be that you have the rudder_server_root role, you could try removing /opt/rudder/etc/server-roles.d/rudder-server-root on the root server and triggering an inventory
    Norberto Aquino
    @norbertoaquino
    @amousset i remove file /opt/rudder/etc/server-roles.d/rudder-server-root and performing inventory on server but the content of file is the same: url = "postgres://rudder@localhost/rudder"
    Norberto Aquino
    @norbertoaquino
    @amousset i run in debug mode:
    ...
    "rudder_postgresql": {
    "db_name": "rudder",
    "db_pass": "c298f2e1945021725035",
    "db_user": "rudder",
    "host": "localhost"
    },
    "rudder_relayd_configuration": {
    "component": "Relayd service configuration",
    "config_dir": "/opt/rudder/etc/relayd",
    "config_file": "/opt/rudder/etc/relayd/main.conf",
    "file_class_prefix": "file_from_template__opt_rudder_etc_relayd_main_conf",
    "service": "rudder-relayd"
    },
    "rudder_roles": {
    "uuid": "root",
    "uuid_file": "/opt/rudder/etc/uuid.hive"
    },
    "rudder_rpm_knowledge": {
    "rpm_compare_equal": "/var/rudder/cfengine-community/bin/rpmvercmp '${v1}' eq '${v2}'",
    "rpm_compare_less": "/var/rudder/cfengine-community/bin/rpmvercmp '${v1}' lt '${v2}'"
    },
    "rudder_servers_by_role": {
    "dim_array": "1",
    "key": [
    "rudder-db"
    ],
    "roles[rudder-db]": "helios.datacenter.local",
    "roles[rudder-db][0]": "rudder-db",
    "roles[rudder-db][1]": "helios.datacenter.local",
    "roles[rudder-db][all]": [
    "helios.datacenter.local"
    ],
    "roles[rudder-db][shuffled]": [
    "helios.datacenter.local"
    ]
    }
    ...
    Norberto Aquino
    @norbertoaquino
    @amousset more information: the class role_rudder_server_root is true in debug mode
    ...
    "role_rudder_db_server_defined": true,
    "role_rudder_server_root": true,
    "role_rudder_webapp": true,
    ...
    Nicolas Charles
    @ncharles
    Hi ! You need to have the role_rudder_db_server_defined defined by defining which server has the db
    Easiest way would be to edit file /opt/rudder/etc/rudder-web.properties
    and replace
    rudder.server-roles.db=autodetect by rudder.server-roles.db=<hostname of the server with the db>
    then restart the webapp, and regenerate policies
    Norberto Aquino
    @norbertoaquino
    I execute all step that you say @ncharles , but dont work. Verifying the classes there are:
    "role_rudder_server_root": true but i removed this file /opt/rudder/etc/server-roles.d/rudder-server-root
    Norberto Aquino
    @norbertoaquino

    @ncharles perhaps the problem is here:
    bundle edit_line root_password_check_file_pgpass(parameter)
    {
    vars:

      "indices" slist => getindices(${parameter});

    field_edits:

      "localhost:5432:rudder:.*"
    
    # Set field of the file to parameter
        edit_field => col(":","${indices}","${${parameter}[${indices}]}","set");

    insert_lines:

      "localhost:5432:rudder:${${parameter}[4]}:${${parameter}[5]}";

    }

    localhost is always add.

    Nicolas Charles
    @ncharles
    ha - role_rudder_server_root is always defined on root
    @amousset "role_rudder_server_root" expression => or(fileexists("${rudder_base}/etc/server-roles.d/rudder-server-root"), strcmp("${g.uuid}", "root"));
    weird
    Nicolas Charles
    @ncharles
    maybe the fix should have been to do the check of passwords for root rather than role_rudder_server_root
    Nicolas Charles
    @ncharles
    what do you think @amousset ?
    Norberto Aquino
    @norbertoaquino

    @amousset @ncharles if ha - role_rudder_server_root is always defined on root will never reach this classe:

    root_server.role_rudder_db_server_defined.!role_rudder_server_root::
    "host" string => "${rudder_servers_by_role.roles[rudder-db]}";

    it's correct?

    pmg
    @pmg7557_twitter
    Hello All, I didn't take it in account before, but I have a time shift of 2 hours shift between the hour indicated (last seen) in the web interface from all my nodes, I rebooted my server without impact. How can I solve this pb?
    François Armand
    @fanf
    @pmg7557_twitter it may be because time is in UTC no? Or perhaps I just didn't understood what you meant
    Norberto Aquino
    @norbertoaquino
    @pmg7557_twitter install ntpdate or chronyd on all nodes and configure your timezone.
    pmg
    @pmg7557_twitter
    @norbertoaquino ntpdate is installed on every nodes via rudder directiev 'Time settings'
    @fanf On the server 'date -> jeudi 1 octobre 2020, 14:03:35 (UTC+0200)' and same on every nodes, bur on the web UI , last seen is 12h01 (for instance for the node of the server)
    Norberto Aquino
    @norbertoaquino
    @pmg7557_twitter What is your time zone and how is timezonectl configured and database timezone too?
    François Armand
    @fanf
    @pmg7557_twitter what version of rudder?
    (before 6.0, there was a bug in node list, and the fact that date was UTC was not displayed)
    pmg
    @pmg7557_twitter
    @fanf 6.02
    @norbertoaquino ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
    François Armand
    @fanf
    @pmg7557_twitter just to be sure I understand correctly the pb: it's on node list, "last seen" column, you have an UTC date in place of a correctly time-zoned one like in that screenshot:
    image.png
    François Armand
    @fanf
    can you check in /var/log/rudder/webapp/2020_... for property: INFO application - registered property: user.timezone= ?
    pmg
    @pmg7557_twitter
    @fanf Yes, like (12h01) like your screeshot
    @fanf cat /var/log/rudder/webapp/2020_10_01.stderrout.log | grep user.ti
    [2020-10-01 07:10:51+0000] INFO application - registered property: user.timezone="Etc/UTC"
    Norberto Aquino
    @norbertoaquino
    @pmg7557_twitter if you adjust the timezone now it's necessary restart the service rudder-jetty
    pmg
    @pmg7557_twitter
    @norbertoaquino I did it, and, since it did not work, I rebooted my server! ... But last msg to @fan the registered time zone seems to be bad, but I don't know how to change it.
    François Armand
    @fanf
    @pmg7557_twitter ok, there is a pb with the timezone seen by Java/JVM. IIRC, there is something specific with it, I will have to dig it
    pmg
    @pmg7557_twitter
    @fanf ok. What about backup, reinstall & restore the server. I never did it, it can be a good exercise. Me server runs in a lxc container, I have backup anyway.
    François Armand
    @fanf
    @pmg7557_twitter don't you want to try the workaroun in the issue?
    Edit /etc/default/rudder-jetty and add:
    
    JAVA_OPTIONS="-Duser.timezone=Europe/Paris"
    pmg
    @pmg7557_twitter
    @fanf I didn't understand it was the solution. Done and Ok , Thanks :-) Don't you have a forum or a wiki to store these infos?
    François Armand
    @fanf
    we tried several things and nothing worked well. We would like to have a "tips and tricks / how to" section in doc (with easy contrib via github), do you think it would be ok?
    (it was on reference manual but not discoverable enought, quite obviously)
    (cc @amousset for the tip & tricks part in doc, or other idea for that user need)
    pmg
    @pmg7557_twitter
    @fanf Personnaly I prefer "discource forum with wiki inside" (see debian-fr.org with litle use of wiki)
    th333boo
    @th333boo
    hello people
    I'm wonder how to uninstall pacakge directive from the wrong group
    If anyone could help me out on that