M
M
MintTea2016-09-28 09:08:14
Node.js
MintTea, 2016-09-28 09:08:14

Why is ceph ignoring out-of-order scrub commands?

A week ago, one of the objects stored in ceph broke, causing the cluster to transition to the HEALTH_ERR status.
The output of the "health detail" command:

$ ceph health detail
> HEALTH_ERR 1 pgs inconsistent; 1 scrub errors; sortbitwise flag(s) set
> pg 11.1c is active+clean+inconsistent, acting [0,5,3]
> 1 scrub errors
> sortbitwise flag(s) set

Asked ceph to fix the specified PG:
$ ceph pg repair 11.1c
> instructing pg 11.1c on osd.0 to repair

Didn't give any effect. Further, following the instructions for manually fixing the object , a specific file was found, the hashes of all copies were verified, and the copy with the broken hash was deleted. Now we need ceph to scrub this pg. I'm trying to ask you to do it right now, and not on a schedule:
$ ceph pg scrub 11.1c
> instructing pg 11.1c on osd.0 to scrub

Nothing happens. Please make a deep scrub:
$ ceph pg deep-scrub 11.1c
> instructing pg 11.1c on osd.0 to deep-scrub

Again nothing happens. That is, ceph promises to scrub me, but when I look at the status of the cluster in a few hours, the picture does not change there. Statistics for pg is also not updated:
$ ceph pg 11.1c query | grep 'last_scrub_stamp'
> "last_scrub_stamp": "2016-09-22 13:45:04.826451",
> "last_scrub_stamp": "2016-09-22 13:45:04.826451",
> "last_scrub_stamp": "2016-09-22 13:45:04.826451",
> "last_scrub_stamp": "2016-09-22 13:45:04.826451",
> "last_scrub_stamp": "2016-09-22 13:45:04.826451",
> "last_scrub_stamp": "2016-09-22 13:45:04.826451",

As far as I understand, I need to wait until ceph deigns to check this pg on schedule?
Why is he ignoring me?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
L
lemme, 2016-09-28
@allishappy

Here is a banal authentication.
User - mongodb model I must
say right away that the password needs to be encrypted - for example (bcrypt), respectively, choose not by username and password, but by username, and then compare the encrypted password with the one received from the post request.
Since this is an example of json authentication, instead of success: true, you need to send a token, but you can do it, there are tons of examples in Google.
As for wanting to do everything myself, you don’t need to say that, and then ask banal things, which, again, there are a ton in Google.
Hipster async/await, nowhere without it :(

app.post('/login', async (req, res, next) => {
  const { username, password } = req.body;
  
  try {
    const user = await User.find({ username, password }).exec();
    
    if (!user) {
    	return res.status(401).json({ message: 'Invalid username or password'});
    }
    return res.send({ success: true });
  } catch(e) {
  	next(e);
  }
});

On the client, everything is simple:
1) Send ajax request (username, password)
2) get status (401/200)
3) parse json
4) if 401, then display an error
5) if 200, then redirect through window.location
ps is written directly here, so I can’t vouch for performance, but it seems that everything should work.
To catch up, so as not to ask such questions, watch the screencast of Ilya Kantor on NodeJS
learn.javascript.ru/screencast/nodejs

A
Anton Ulanov, 2016-09-28
@antonsr98

ajax post :)

H
he he, 2016-09-28
@tosha_lol_daaa

And what's the problem then?
Send data to js (POST) and as a response from the server:
success , then

M
morfair, 2017-10-19
@morfair

Try stopping both OSDs and copying the correct file to the OSD you deleted from, then run.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question