-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Migrations only run once #32237
Comments
Pinging @elastic/kibana-operations |
That spaces error occurs when the default space document is deleted. We insert that only once on startup. Are we restoring an unmigrated |
Yup in this case 6.4.3. |
It feels like a lot of stuff in the future will break if users skip the migrations and run from an old index. |
Hi, I've the same issue after to have upgraded elastic.co from 6.8.0 to 7.1.1. My first error after the upgrade was "mapping set to strict, dynamic introduction of [references] within [doc] is not allowed" so I deleted the .kibana* indexes. Thanks for your support and guidance ;) |
Pinging @elastic/kibana-platform (Team:Platform) |
After initial migration, we are also migrating every object during actual access. However, we indeed are only creating the mapping once, during startup. Meaning that this
Will cause that kind of errors, which are basically fatals atm, during next access of the index:
Not sure what we should be doing to try to avoid that though. We would need a way to detect that the index schema has been modified from an external source and reapply migration? Or identify this specific error and (try to) reapply migration when it occur? BTW
If not already, we really should document that such operation should not be done with a running kbn instance
This is a real and valid issue.
Not sure to see how what would cause the mapping to differ at some point? |
This could be solved by the same mechanism proposed in #52202 to prevent old nodes from interfering with upgraded/migrated indices. |
Without continuous polling we can't detect an index being changed/restored and unless the polling window is really small we won't be able to prevent the problems from happening. So I don't think we will ever be able to support Kibana running while it's indices are removed/restored to a previous version, but we should aim to reduce the impact. To reduce the impact:
If writing to a non-existing index causes a fatal error Kibana will automatically shutdown and in most deployments restart itself, which means for most users Kibana will automatically recover from an earlier version's index being restored. |
{ docker stack ps elk
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
p55l69sfipll elk_elasticsearch.1 elasticsearch:7.13.0 test2 Running Running 8 hours ago
626vmzz8zadi \_ elk_elasticsearch.1 elasticsearch:7.13.0 test2 Shutdown Failed 8 hours ago "task: non-zero exit (127)"
lyqsr2tzgj03 elk_kibana.1 kibana:7.13.0 test2 Running Running 2 days ago
2wc3tpoenh9i elk_logstash.1 logstash:7.13.0 test2 Running Running 2 days ago |
kibana log
|
docker-stack.yml version: '3.3'
services:
elasticsearch:
image: elasticsearch:7.13.0
ports:
- "9200:9200"
- "9300:9300"
configs:
- source: elastic_config
target: /usr/share/elasticsearch/config/elasticsearch.yml
environment:
ES_JAVA_OPTS: "-Xmx512m -Xms512m"
ELASTIC_PASSWORD: changeme
# Use single node discovery in order to disable production mode and avoid bootstrap checks.
# see: https://www.elastic.co/guide/en/elasticsearch/reference/current/bootstrap-checks.html
discovery.type: single-node
# Force publishing on the 'elk' overlay.
network.publish_host: _eth0_
networks:
- elk
deploy:
mode: replicated
replicas: 1
logstash:
image: logstash:7.13.0
ports:
- "5044:5044"
- "5000:5000"
- "9600:9600"
configs:
- source: logstash_config
target: /usr/share/logstash/config/logstash.yml
- source: logstash_pipeline
target: /usr/share/logstash/pipeline/logstash.conf
environment:
LS_JAVA_OPTS: "-Xmx512m -Xms512m"
networks:
- elk
deploy:
mode: replicated
replicas: 1
kibana:
image: kibana:7.13.0
ports:
- "5601:5601"
configs:
- source: kibana_config
target: /usr/share/kibana/config/kibana.yml
networks:
- elk
deploy:
mode: replicated
replicas: 1
configs:
elastic_config:
file: ./elasticsearch/config/elasticsearch.yml
logstash_config:
file: ./logstash/config/logstash.yml
logstash_pipeline:
file: ./logstash/pipeline/logstash.conf
kibana_config:
file: ./kibana/config/kibana.yml
networks:
elk:
driver: overlay |
here is the source |
@blankhang if you have a specific problem, please open a new issue with the detail and description. |
cc @elastic/kibana-security for awareness
The text was updated successfully, but these errors were encountered: