:title: Paste .. _paste: Paste ##### Paste servers are an easy way to share long-form content such as configuration files or log data with others over short-form communication protocols such as IRC. OpenStack runs the "lodgeit" paste software. At a Glance =========== :Hosts: * http://paste.opendev.org :Ansible: * :git_file:`playbooks/roles/lodgeit/` :Projects: * https://opendev.org/opendev/lodgeit :Bugs: * https://storyboard.openstack.org/#!/project/748 Overview ======== For OpenStack we use `a fork `_ of lodgeit which is based on one with bugfixes maintained by `dcolish `_ but adds back missing anti-spam features required by OpenStack. Ansible configures lodgeit to use mariadb database backend, apache as a front-end proxy. Manual Administrative Tasks =========================== Deleting a Paste ---------------- The quickest way to do this is database surgery. Lodgeit uses a MariaDB container on the paste server, and only has a single table in its database, so this is quite straightforward. Connect to the database with an interactive client session like so:: sudo docker-compose -f /etc/lodgeit-compose/docker-compose.yaml exec \ mariadb bash -c '/usr/bin/mysql -uroot -p"$MYSQL_ROOT_PASSWORD" lodgeit' These days we've configured Lodgeit to use so-called "private" identifiers by default, so that's what you'll likely be keying from. For the sake of example let's pretend the URL is ``https://paste.opendev.org/show/thisIsSomeMadeUpBlob/``. First check the row you're about to delete:: SELECT code FROM pastes WHERE private_id='thisIsSomeMadeUpBlob'; Note that if you instead have an old-style integer index identifier, you'll need to use ``paste_id`` with that instead of ``private_id``. You should see the ``code`` field content from one row matching the content of the page you're preparing to delete. If it looks correct, proceed with the deletion:: DELETE FROM pastes WHERE private_id='thisIsSomeMadeUpBlob'; That command should return a response like ``1 row in set (0.001 sec)`` if it was successful. Try to load the paste in your browser again and hopefully it now says ``PageNot Found`` instead of returning the prior content. If all's as intended, ``^D`` out of the interactive shell and you're done!