Answer the question
In order to leave comments, you need to log in
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
$ ceph pg repair 11.1c
> instructing pg 11.1c on osd.0 to repair
$ ceph pg scrub 11.1c
> instructing pg 11.1c on osd.0 to scrub
$ ceph pg deep-scrub 11.1c
> instructing pg 11.1c on osd.0 to deep-scrub
$ 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",
Answer the question
In order to leave comments, you need to log in
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);
}
});
And what's the problem then?
Send data to js (POST) and as a response from the server:
success , then
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question