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

WIP: Collect uptime data in daily heartbeat from connect-ng #1069

Closed
wants to merge 1 commit into from

Conversation

chajain
Copy link
Collaborator

@chajain chajain commented Jan 12, 2024

Description

Uptime data is included in the data sent to SCC via RMT
https://jira.suse.com/browse/CSE-504
Fixes # (issue)

Change Type

Please select the correct option.

  • Bug Fix (a non-breaking change which fixes an issue)
  • New Feature (a non-breaking change which adds new functionality)
  • Documentation Update (a change which only updates documentation)

Checklist

Please check off each item if the requirement is met.

  • I have verified that my code follows RMT's coding standards with rubocop.
  • I have reviewed my own code and believe that it's ready for an external review.
  • I have provided comments for any hard-to-understand code.
  • I have documented the MANUAL.md file with any changes to the user experience.
  • RMT's test coverage remains at 100%.
  • If my changes are non-trivial, I have added a changelog entry to notify users at package/obs/rmt-server.changes.

Other Notes

Please use this space to provide notes or thoughts to the team, such as tips on how to review/demo your changes.

How to test this PR

  • On the client system clone https://github.com/guangyee/connect-ng/tree/uptime_tracking_for_msps ( this branch has the connect-ng changes for uptime tracking feature )
  • Follow the instructions in guangyee/connect-ng@f6ea992
  • On the RMT system, clone this code
  • Execute rails db:migrate to create the system_uptimes table
  • Start the server bin/rails server -b 0.0.0.0
  • Register the system on client system using command suseconnect --url <rmt_system_ip> , it should populate the system_uptimes table with the entries from /etc/zypp/suse-uptime.logs on client system

@chajain chajain changed the title Collect uptime data in daily heartbeat from connect-ng WIP:Collect uptime data in daily heartbeat from connect-ng Jan 16, 2024
@chajain chajain changed the title WIP:Collect uptime data in daily heartbeat from connect-ng WIP: Collect uptime data in daily heartbeat from connect-ng Jan 16, 2024
@chajain chajain force-pushed the uptime branch 8 times, most recently from 4f2a7e4 to 0acfa1a Compare January 20, 2024 20:18
Copy link
Contributor

@felixsch felixsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since there is no synchronization mechanism now, how exactly is this later extracted? Manually? Right now there is no synchronization to SCC implemented.

Another topic which is definitly needed I guess, is to come up with a solution which shares the uptimes with siblings instances in PubCloud.

Lets have a talk about this topics.

rescue ActiveRecord::RecordNotUnique
logger.info(N_("Uptime information existing for system '%s'") % @system.id)
end
SystemUptime.where("online_at_day < '#{90.days.ago.to_date}'").delete_all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this has impact on the RMT performance if it is called on every request. Did you look into this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's discuss what the options are on wed morning meeting

@felixsch
Copy link
Contributor

We have the rule of describing the at least a little bit in the PR description text what are you doing + having instructions how to test this changed behavior. Can you add these two missing items in the PR description?

@chajain chajain force-pushed the uptime branch 2 times, most recently from 0dc6d6c to 60bdec0 Compare January 22, 2024 23:38
@chajain chajain force-pushed the uptime branch 3 times, most recently from b9700ed to 27ab9d8 Compare February 13, 2024 01:41
@chajain
Copy link
Collaborator Author

chajain commented Feb 13, 2024

Created new PR #1090 , so closing this

@chajain chajain closed this Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants