[Bug]: option `-n, --no-interaction` is ignored on occ db:convert-type command
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 68/100
Direzione di ricerca
L’issue menziona core/Command/Db/ConvertType.php e mostra che la richiesta di conferma viene ancora eseguita con --no-interaction. Leggi la gestione della richiesta nelle righe segnalate, poi controlla i test esistenti del comando per le opzioni di conversione del database. Il lavoro è completato quando --no-interaction salta la richiesta e la conversione prosegue; l’issue non indica il nome di alcun file di test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
⚠️ This issue respects the following points: ⚠️
- This is not a troubleshooting question, general support matter, or webserver/proxy problem, but likely a bug (if unsure, ask the Community Help Forum).
- This issue is not already reported on Github OR solved at the Community Help Forum (I've searched!).
- I'm using a maintained major version of Nextcloud Server and tested against the latest patch level. (Supported major versions and current patch levels).
- I agree to follow Nextcloud's Code of Conduct.
- I've tried my best to provide clear reproduction steps that someone unfamiliar with this bug could use to reproduce it.
Bug description
Due to the length process of database convertion, I would like to run occ db:convert-type on nohup. However, the command simply quited when stdin was read.
# nohup occ db:convert-type --password='PASSWORD' --port="5432" --all-apps --no-interaction pgsql 'nc_user' postgresql nextcloud >/config/convertion-pgsql.log 2>&1 &
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
Clearing schema in new database
Creating schema in new database
- password_policy
- memories
- files_external
- text
- external
- cloud_federation_api
- serverinfo
- user_ldap
- nextcloud_announcements
- admin_audit
- encryption
- oauth2
- notifications
- contactsinteraction
- privacy
- logreader
- recognize
- activity
- comments
- twofactor_nextcloud_notification
- app_api
- sharing
- maps
- related_resources
- webhook_listeners
- files_lock
- files_trashbin
- photos
- firstrunwizard
- user_status
- files_reminders
- viewer
- circles
- dashboard
- workflowengine
- survey_client
- files_downloadlimit
- theming
- twofactor_backupcodes
- recommendations
- files_pdfviewer
- testing
- previewgenerator
- lookup_server_connector
- sharebymail
- files_sharing
- weather_status
- systemtags
- settings
- imageconverter
- appstore
- support
- provisioning_api
- federation
- suspicious_login
- bruteforcesettings
- federatedfilesharing
- files_versions
- updatenotification
- profile
- office
- dav
- twofactor_totp
- files
The following tables will not be converted:
memories_planet_geometry
oc_ex_event_handlers
oc_ex_speech_to_text
oc_ex_speech_to_text_q
oc_ex_text_processing
oc_ex_text_processing_q
oc_ex_translation
oc_ex_translation_q
oc_facerecog_faces
oc_facerecog_images
oc_facerecog_models
oc_facerecog_persons
oc_file_metadata
Continue with the conversion (y/n)? [n]
The following command failed as well.
# nohup bash echo -e "y\n" | occ db:convert-type --password='PASSWORD' --port="5432" --all-apps --no-interaction pgsql 'nc_user' postgresql nextcloud >/config/convertion-pgsql.log 2>&1 &
I've solved the problem by following the suggestion from Converting DB Type with single command of the Help forums
Steps to reproduce
- type the following command into the terminal
nohup sudo -E -u www-data php occ db:convert-type --password='PASSWORD' --port="5432" --all-apps --no-interaction pgsql 'nc_user' postgresql nextcloud >/config/convertion-pgsql.log 2>&1 &
Expected behavior
It convert the database successfully.
Nextcloud Server version
35
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.5
Web server
Nginx
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"serverid": 0,
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"***REMOVED SENSITIVE VALUE***"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"version": "35.0.2.2",
"dbtype": "mysql",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"default_locale": "en_US",
"default_phone_region": "GB",
"default_timezone": "Europe\/London",
"knowledgebaseenabled": true,
"remember_login_cookie_lifetime": 2592000,
"session_lifetime": 604800,
"session_relaxed_expiry": false,
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_smtpmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpsecure": "tls",
"mail_smtpauth": true,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"mail_sendmailmode": "smtp",
"mail_smtpauthtype": "LOGIN",
"overwritehost": "",
"overwriteprotocol": "",
"overwrite.cli.url": ***REMOVED SENSITIVE VALUE***",
"connectivity_check_domains": [
"***REMOVED SENSITIVE VALUE***"
],
"logfilemode": 416,
"loglevel": 2,
"log_rotate_size": 10485760,
"enable_previews": true,
"preview_concurrency_all": 36,
"preview_concurrency_new": 18,
"preview_max_x": 1024,
"preview_max_y": 1024,
"preview_max_filesize_image": 50,
"preview_max_memory": 256,
"preview_imaginary_url": "***REMOVED SENSITIVE VALUE***",
"jpeg_quality": 60,
"preview_max_scale_factor": 1,
"enabledPreviewProviders": [
"OC\\Preview\\Imaginary",
"OC\\Preview\\Krita",
"OC\\Preview\\MarkDown",
"OC\\Preview\\OpenDocument",
"OC\\Preview\\TXT",
"OC\\Preview\\PNG",
"OC\\Preview\\JPEG",
"OC\\Preview\\GIF",
"OC\\Preview\\BMP",
"OC\\Preview\\XBitmap",
"OC\\Preview\\WebP",
"OC\\Preview\\Movie",
"OC\\Preview\\TIFF",
"OC\\Preview\\HEIC",
"OC\\Preview\\Image"
],
"maintenance": true,
"maintenance_window_start": 2,
"memcache.local": "\\OC\\Memcache\\APCu",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0
},
"theme": "",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"memcache.locking": "\\OC\\Memcache\\Redis",
"debug": false,
"filelocking.enabled": true,
"upgrade.disable-web": false,
"filesystem_check_changes": 0,
"memories.exiftool": "\/config\/www\/nextcloud\/apps\/memories\/bin-ext\/exiftool-amd64-musl",
"memories.vod.path": "\/config\/www\/nextcloud\/apps\/memories\/bin-ext\/go-vod-amd64",
"memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
"memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
"memories.db.triggers.fcu": true,
"activity_expire_days": 731
}
}
List of activated Apps
Nextcloud is in maintenance mode, no apps are loaded.
Commands provided by apps are unavailable.
Enabled:
- activity: 8.0.0
- appstore: 2.0.0
- bruteforcesettings: 8.0.0
- circles: 35.0.0
- cloud_federation_api: 2.0.0
- comments: 2.0.0
- contactsinteraction: 2.0.0
- dashboard: 8.0.0
- dav: 2.0.0
- external: 10.0.0
- federatedfilesharing: 2.0.0
- federation: 2.0.0
- files: 3.0.0
- files_downloadlimit: 5.3.0
- files_external: 2.0.0
- files_lock: 35.0.1
- files_pdfviewer: 8.0.0
- files_reminders: 2.0.0
- files_sharing: 2.0.0
- files_trashbin: 2.0.0
- files_versions: 2.0.0
- firstrunwizard: 8.0.0
- logreader: 8.0.0
- lookup_server_connector: 2.0.0
- nextcloud_announcements: 7.0.0
- notifications: 8.0.1
- oauth2: 2.0.0
- office: 1.1.0
- password_policy: 7.0.0
- photos: 8.0.0
- privacy: 7.0.0
- profile: 2.0.0
- provisioning_api: 2.0.0
- recognize: 13.1.0
- recommendations: 8.0.0
- related_resources: 6.0.0
- serverinfo: 7.0.0
- settings: 2.0.0
- sharebymail: 2.0.0
- sharing: 1.0.4
- support: 7.0.0
- survey_client: 7.0.0
- systemtags: 2.0.0
- text: 9.0.1
- theming: 3.0.0
- twofactor_backupcodes: 2.0.0
- twofactor_totp: 17.1.0
- updatenotification: 2.0.0
- user_status: 2.0.0
- viewer: 8.0.0
- weather_status: 2.0.0
- webhook_listeners: 2.0.0
- workflowengine: 3.0.0
Disabled:
- admin_audit: 2.0.0
- app_api: 35.0.0 (installed 32.0.0)
- encryption: 3.0.1
- imageconverter: 2.2.0 (installed 2.2.0)
- maps: 1.6.0 (installed 1.6.0)
- memories: 8.0.1 (installed 8.0.1)
- previewgenerator: 5.13.0 (installed 5.13.0)
- suspicious_login: 13.0.0 (installed 10.0.0-dev.0)
- testing: 1.23.0
- twofactor_nextcloud_notification: 9.0.0
- user_ldap: 2.0.0
Nextcloud Signing status
The database is converting.
Nextcloud is in maintenance mode.
Nextcloud Logs
Additional info
The Nextcloud instance is running in a docker container made from this image: linuxserver/nextcloud:latest
The modification I have made to [nextcloud]/core/Command/Db/ConvertType.php
# diff ConvertType.php.ori ConvertType.php
--- ConvertType.php.ori
+++ ConvertType.php
@@ -188,16 +188,17 @@
$output->writeln('<comment>Please note that tables belonging to disabled (but not removed) apps</comment>');
$output->writeln('<comment>can be included by specifying the --all-apps option.</comment>');
}
+ if (!$input->getOption('no-interaction')) {
+ $continueConversion = !$input->isInteractive(); // assume yes for --no-interaction and no otherwise.
+ $question = new ConfirmationQuestion('Continue with the conversion (y/n)? [n] ', $continueConversion);
- $continueConversion = !$input->isInteractive(); // assume yes for --no-interaction and no otherwise.
- $question = new ConfirmationQuestion('Continue with the conversion (y/n)? [n] ', $continueConversion);
+ /** @var QuestionHelper $helper */
+ $helper = $this->getHelper('question');
- /** @var QuestionHelper $helper */
- $helper = $this->getHelper('question');
-
- if (!$helper->ask($input, $output, $question)) {
- return 1;
+ if (!$helper->ask($input, $output, $question)) {
+ return 1;
+ }
}
}
$intersectingTables = array_intersect($toTables, $fromTables);
$this->convertDB($fromDB, $toDB, $intersectingTables, $input, $output);
- Lingua principale
- PHP
- Stelle
- 37.2k
- Fork
- 5.3k
- Merge medio
- 2g 3h
- PR unite (30g)
- 648
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nextcloud/server
-
1. to develop bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
0. Needs triage 35-feedback bug team: Files
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug]: SnowflakeGenerator passes arguments in wrong order to ISequence, causing duplicate IDs in Nextcloud 35Forse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta0. Needs triage 35-feedback bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
nextcloud/server#65434 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
0. Needs triage 35-feedback bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
I maintainer di solito rispondono entro 1 giorno
-
34-feedback
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nextcloud/server
Issue simili
-
Awaiting Triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
reproduced
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
anomalyco/opencode#58664 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 87/100
WordPress/phpunit-test-runner#364 ·
I maintainer di solito rispondono entro 4 giorni
-
domain/framework Platform(Default) priority/high
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 2 giorni