Opened 9 years ago

Closed 9 years ago

#521 closed defect (fixed)

bind10.boot_time can be incorrect

Reported by: jinmei Owned by: naokikambe
Priority: medium Milestone: Sprint-20110419
Component: statistics Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity:
Sub-Project: Feature Depending on Ticket:
Estimated Difficulty: 6.0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

On my personal server (which is quite slow) "Stats show" shows a bogus
bind10.boot_time:

> Stats show
{
    "auth.queries.tcp": 5, 
    "auth.queries.udp": 271, 
    "bind10.boot_time": "1970-01-01T00:00:00Z",
    ...

I suspect this is because when the bind10 process tried to send this value
to b10-stats before it's running. bind10 introduces 1 second of delay,
but it's probably too short for my poor server:

    # send "bind10.boot_time" to b10-stats
    time.sleep(1) # wait a second
...
    boss_of_bind.cc_session.group_sendmsg(cmd, 'Stats')

As my case indicates, adding a sleep is not a reliable way. On the
other hand, for faster machines it could be an unnecessary delay before
the system is ready to work and is thus undesirable.

IMO the right solution is that bind10 remembers the boot time and has
b10-stats ask for it.

Subtickets

Change History (12)

comment:1 Changed 9 years ago by naokikambe

  • Owner set to naokikambe
  • Status changed from new to accepted

comment:2 Changed 9 years ago by naokikambe

  • Owner changed from naokikambe to UnAssigned
  • Status changed from accepted to reviewing

Ready for reviewing at git 9b90408108142c710c2adb403e61af374fe1b24c
with a proposed ChangeLog entry

comment:3 Changed 9 years ago by naokikambe

  • Estimated Difficulty changed from 0.0 to 6.0

comment:4 Changed 9 years ago by stephen

  • Milestone feature backlog item deleted

Milestone feature backlog item deleted

comment:5 Changed 9 years ago by shane

  • Milestone set to Sprint-20110405

comment:6 Changed 9 years ago by vorner

  • Owner changed from UnAssigned to vorner

comment:7 follow-up: Changed 9 years ago by vorner

  • Owner changed from vorner to naokikambe

Hello

I didn't find any tests in the changes. But boss has a new command and there probably should be a test that the stats module sends the request when it starts.

comment:8 in reply to: ↑ 7 Changed 9 years ago by naokikambe

  • Owner changed from naokikambe to vorner

I git-pushed at 6ff2a83cb7a6c04a258e84818257fe6eda9634a6. I added a new test case for command_handler of Bob. Please check it.
Thanks,

comment:9 follow-up: Changed 9 years ago by vorner

  • Owner changed from vorner to naokikambe

Hello

This test is good. But still, what about the part of changes in the stats daemon? I didn't find a test checking it sends the command to boss, do I look into the wrong place, or is it really missing?

Thanks

comment:10 in reply to: ↑ 9 Changed 9 years ago by naokikambe

  • Owner changed from naokikambe to vorner

Yes, I really missed adding test for stats daemon. I had already pushed the codes. Please see git 4d505b0cef54209575173d52e4f9a3e6e244dab3.
Additionally, as the branch trac521 was too old, I had merged it with the current master branch. I fixed some conflicts, and I added test for some new commands ("ping" and "show_processes") into bind10_test.py because they was newly added into Boss. So please see also git d8c55247d888cd9f5e2e474e49f8bd97b96623cf.
Thanks,

comment:11 follow-up: Changed 9 years ago by vorner

  • Owner changed from vorner to naokikambe

Good ☺.

Thanks, lets merge this.

comment:12 in reply to: ↑ 11 Changed 9 years ago by naokikambe

  • Resolution set to fixed
  • Status changed from reviewing to closed

Merging was done, I'm closing it. Thanks,

Note: See TracTickets for help on using tickets.