Comments (12)
Good point. If the cluster has been configured, but no mons are available, ceph/config will fail. The real question is what to do about it. We can try to pull a monmap from etcd, but that would require the mons to update that key somehow.
I think as we converge the rest of the components on etcd/consult/confd, we'll be able to make that viable.
As a stop-gap, we can at least check for the existence of the monmap before attempting to pull it. I'll get that updated when I get some time, or someone can PR it.
from ceph-container.
Of course, that probably won't fix your problem, since in order to get to that point, you have to have not had a ceph.conf. If you don't have that, you probably don't have a monmap, either.
from ceph-container.
I suggest dropping the line with ceph mon getmap -o /etc/ceph/monmap
It is assuming a mon is running when it is not necessarily true.
The peer list can be fully populated later injecting a command into the container with something like this or using a dedicated container (in the same pod) to do so.
from ceph-container.
@h0tbird I think you're right. Lines 44 and 45 are essentially a duplication of effort. We should pull from the KV store and attempt to get a current map, but not fail if we cannot succeed, as long as we have a monmap from which to work.
So, as I see it, the logic should be:
if [ ! -f /etc/ceph/monmap]; then
kviator... <get monmap>
fi
# ...
# Attempt to get most recent monmap (should be done in main start_mon routine)
set +e
timeout 5 ceph mon getmap -o /etc/ceph/monmap
set -e
from ceph-container.
Funny enough I had a similar concern while reviewing the first kv PR #103
@Ulexus During the attempt to get the most recent monmap, should we take the opportunity to compare the map and then update the kv backend as well?
from ceph-container.
@leseb My original thought was to attempt to pull the monmap regardless of the backend (and hence, execute it as a part of the main start_mon
function. Somehow, though, the monmap does need to be updated in the kv store, and that's as good a time as any. It's probably more flexible to keep the monmap updating in the backend handler, anyway.
TLDR; sounds good to me
from ceph-container.
@CoRfr Since d91137d is merged you should be able to restart the monitors now.
I also have trouble restarting the OSD containers because the OSD_DEVICE
is initialized every time. Replacing this...
case "$OSD_TYPE" in
directory)
osd_directory
;;
disk)
osd_disk
;;
activate)
osd_activate
;;
*)
if [ -n "$(find /var/lib/ceph/osd -prune -empty)" ]; then
echo "No bootstrapped OSDs found; trying ceph-disk"
osd_disk
else
echo "Bootstrapped OSD(s) found; using OSD directory"
osd_directory
fi
;;
esac
...with this...
case "$OSD_TYPE" in
directory)
osd_directory
;;
disk)
if [ -n "$(find /var/lib/ceph/osd -prune -empty)" ]; then
echo "No bootstrapped OSDs found; trying ceph-disk"
osd_disk
else
echo "Bootstrapped OSD(s) found; no bootstrapping will be performed"
osd_activate
fi
;;
activate)
osd_activate
;;
*)
echo "<usage warning goes here>"
exit 1
;;
esac
...makes more sense in my current use case.
from ceph-container.
@h0tbird The default is for a different case: providing reasonable defaults. The core point you make here is that you shouldn't have to change "disk" to "activate" after the first run. You want to specify the type and not have to change it?
from ceph-container.
@Ulexus Yes, I could not have said it better. I agree the code above is wrong, in fact a different implementation has been already merged 16add9b. Let me know how you feel about it.
from ceph-container.
@h0tbird Yes, that looks to be perfect.
from ceph-container.
@CoRfr It appears this issue is satisfied. Can you verify?
from ceph-container.
Closing this for now, feel free to reopen.
from ceph-container.
Related Issues (20)
- /opt/ceph-container/bin/osd_disk_prepare.sh: line 46: ceph-disk: command not found HOT 7
- Need fix for CVE-2022-21797 HOT 4
- Bootstrap process hangs up for hours HOT 2
- not found /var/lib/ceph/osd/ceph-2//keyring HOT 2
- dnf update in ceph v18 container image is failing HOT 2
- RocksDBStore - cannot set permissions: Operation not permitted HOT 2
- /usr/bin/ceph: stderr Error EIO: Module 'cephadm' has experienced an error and cannot handle commands: ContainerInspectInfo HOT 2
- add ceph-mgr-callhome to IBM downstream container HOT 2
- cephadm has failed ContainerInspectInfo HOT 2
- populate_kvstore error HOT 1
- rename and repurpose this repository HOT 19
- reef builds don't work HOT 12
- Question about osd directory HOT 2
- docker-compose setup dose not run as expected mds and osd HOT 3
- With new quay.io/ceph/ceph:v16 image, ceph-csi meet segfault error HOT 2
- ceph/demo container does not expose mon port 3300 HOT 2
- Instructions for getting the zabbix template to work with rook-ceph HOT 2
- smartctl could not scrape metrics from HPE Smart Array in HBA mode HOT 2
- support VERSION=8 for contrib/compose-rhcs.sh
- Include cephfs-shell HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ceph-container.