Uploaded image for project: 'HipChat'
  1. HipChat
  2. HCPUB-2798

/file_store and /chat_history disks do not scale on boot of HipChat Server

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • None
    • HCS 2.2.0, HCS 2.2.1, HCS 2.2.4
    • Component needed
    • None
    • Severity 2 - Major

    Description

      Summary

      On boot of HipChat Server, the /file_store and /chat_history disks are not resized accordingly when free space is allotted in the VM preferences

      Environment

      HipChat Server v2.2.0, v2.2.1

      Steps to Reproduce

      1. Shut down HipChat Server VM
      2. In your VM preferences, increase <vm-name>-disk-2.vdmk or <vm-name>-disk-3.vdmk according to the VM software guidelines.
      3. Boot up Hipchat Server
      4. Run df -h in the command line and notice that the new space has not been allocated

      Expected Results

      The appropriate disks will show the increased space.

      Actual Results

      The disks are not scaled and show the old disk alottment.

      Notes

      You can run lsblk in the HipChat Server console to show if the disk has been expanded but the partition hasn't. This will show you if you are affected by the bug if the disk output shows the new volume size, but the partition does not.

      The issue appears to lie with /opt/atlassian/hipchat/sbin/_scale_disks.sh (which is referenced in the workaround).

      Workaround

      1. Log into the HipChat Server command line.
      2. Gain root:
        sudo dont-blame-hipchat
        
      3. Next, we're going to edit the _scale_disks.sh script
        nano /opt/atlassian/hipchat/sbin/_scale_disks.sh
        
      4. Line 56 and 57 of this script (use CTRL+C to read the line) we will need to add a 1 at the end of each of the disk path. For instance, before the change, the original lines look like:
        df | grep -q mapper/chat && lvm_grow /dev/mapper/chat_history_vg-chat_history /dev/sdb
        df | grep -q mapper/file && lvm_grow /dev/mapper/file_store_vg-file_store /dev/sdc
        

        And after the script is edited, it will look like this:

        df | grep -q mapper/chat && lvm_grow /dev/mapper/chat_history_vg-chat_history /dev/sdb1
        df | grep -q mapper/file && lvm_grow /dev/mapper/file_store_vg-file_store /dev/sdc1
        
      5. Use CTRL+X to exit and Y to save changes.
      6. Now execute the script:
        /opt/atlassian/hipchat/sbin/_scale_disks.sh
        
      7. Next, copy and run this command exactly into the HipChat Server command line:
        NEWSIZE=$(parted /dev/sdc print | grep Disk | awk '{ print $3 }') && parted /dev/sdc resizepart 1 $NEWSIZE
        

        This step is geared towards increasing the /file_store partition. If you need to increase /chat_storage, replace /dev/sdc with /dev/sdb in both places it's referenced above before running.

      8. And finally, rerun step 6:
        /opt/atlassian/hipchat/sbin/_scale_disks.sh
        
      9. Then check to see if the disk has scaled:
        df -h
        

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dmaye@atlassian.com David Maye
              Archiver:
              mandreacchio Michael Andreacchio

              Dates

                Created:
                Updated:
                Resolved:
                Archived: