Project

Profile

Help

Story #3810

Updated by dkliban@redhat.com over 4 years ago

h2. Desired workflow for migrating ISO This story covers only content units and no repositories/remotes/publisher/etc migration. 

 h5. 1. Create Requirements 
 * run on a migration plan by POSTing to */pulp/api/v3/migration-plans/* the following JSON. 

 <pre> machine where Pulp3 is installed 
 {   
     "plugins": [  
        { 
          "type": "file", 
          "content": true, 
        } 
     ] * Pulp 3 environment (Django 2.x, Python 3.6+) 
 } 
 </pre>  

 h5. 2. Run the migration plan  

 POST request * shared FS to */pulp/api/v3/migration-plans/asdf-2345-ghjk-4567-adc/run/* 

 h2. Implementation details 

 The migrate_from_pulp2 task[0] needs to be updated to do the following: 

 1. Dispatch 36 'migrate_content' coroutines with access Pulp 2 parameters: 'iso' and one of the letters of the alphabet or a digit. storage (for in-place migration) 
 2. The 'migrate_content' coroutine is going * access to query the Pulp2Content model for: type='iso', pulp3content=None, uuid LIKE 'a%' (or whatever character was passed in). Pulp2 MongoDB 
 3. For each unit discovered, the coroutine will do the following: * can be interrupted/re-run multiple times and continue migration 

 Migrate Pulp2 ISO content into Pulp3 File content 
 * create a hard link in /var/lib/pulp/artifacts/ directory 
 * create Artifact in the Pulp3 database 
 * create FileContent in the Pulp3 database 
 * update record progress by storing references for pulp 2 and pulp 3 content unit in the Pulp2Content model with a reference to the FileContent 



 [0] https://github.com/pulp/pulp-2to3-migrate/blob/master/pulp_2to3_migrate/app/tasks/migrate.py#L3 database 

Back